lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <000001cd0fcc$0d004940$2700dbc0$@codeaurora.org>
Date:	Sun, 1 Apr 2012 11:25:29 +0530
From:	"Subhash Jadavani" <subhashj@...eaurora.org>
To:	<linux-mmc@...r.kernel.org>
Cc:	<linux-kernel@...r.kernel.org>, <linux-arm-msm@...r.kernel.org>
Subject: __blk_end_request vs blk_end_request

Hi,

For completing any block request, MMC block driver is calling:
       spin_lock_irq(queue)
       _blk_end_request()
       spin_unlock_irq(queue)

But if we analyze the sources of latency in kernel using ftrace,
__blk_end_request() function seems to hold a spinlock with interrupts
disabled for up to 6.5 ms sometimes. Attached is ftrace output for this
function.

__blk_end_request() calls couple of functions and ftrace output shows that
blk_update_bidi_request() function is almost taking 6ms. So I was wondering
why can't we use the blk_end_request() rather than __blk_end_request(). Both
function does the same thing except blk_end_request() doesn't take up the
spinlock while calling the blk_update_bidi_request().

Is there any race condition which could occur if we call
blk_update_bidi_request() without queue lock? I looked into
blk_update_bidi_request() function and I mainly updates bio's of a request
and doesn't look to do any manipulation with request queue structure of
block device. There are many block drivers (SCSI, IDE etc .) other than MMC
uses blk_end_request() rather than __blk_end_request(). Was there any
special reason we are using __blk_end_request() in MMC block driver? If
there is no specific reason, I would like to post a patch which would make
MMC driver to use blk_end_request().

Let me know your thoughts on this.

Regards,
Subhash
--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.




View attachment "ftrace-output.txt" of type "text/plain" (237951 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ