<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/block/elevator.c, branch linux-2.6.16.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>elevator: move clearing of unplug flag earlier</title>
<updated>2007-04-20T22:13:30+00:00</updated>
<author>
<name>Linas Vepstas</name>
<email>linas@austin.ibm.com</email>
</author>
<published>2007-04-20T22:13:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=908991f13837d34a445fc313e44fd7b6dbb5c5c9'/>
<id>908991f13837d34a445fc313e44fd7b6dbb5c5c9</id>
<content type='text'>
A flag was recently added to the elevator code to avoid
performing an unplug when reuests are being re-queued.
The goal of this flag was to avoid a deep recursion that
can occur when re-queueing requests after a SCSI device/host
reset.  See http://lkml.org/lkml/2006/5/17/254

However, that fix added the flag near the bottom of a case
statement, where an earlier break (in an if statement) could
transport one out of the case, without setting the flag.
This patch sets the flag earlier in the case statement.

I re-discovered the deep recursion recently during testing;
I was told that it was a known problem, and the fix to it was
in the kernel I was testing. Indeed it was ... but it didn't
fix the bug. With the patch below, I no longer see the bug.

Signed-off by: Linas Vepstas &lt;linas@austin.ibm.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A flag was recently added to the elevator code to avoid
performing an unplug when reuests are being re-queued.
The goal of this flag was to avoid a deep recursion that
can occur when re-queueing requests after a SCSI device/host
reset.  See http://lkml.org/lkml/2006/5/17/254

However, that fix added the flag near the bottom of a case
statement, where an earlier break (in an if statement) could
transport one out of the case, without setting the flag.
This patch sets the flag earlier in the case statement.

I re-discovered the deep recursion recently during testing;
I was told that it was a known problem, and the fix to it was
in the kernel I was testing. Indeed it was ... but it didn't
fix the bug. With the patch below, I no longer see the bug.

Signed-off by: Linas Vepstas &lt;linas@austin.ibm.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block layer: elv_iosched_show should get elv_list_lock</title>
<updated>2006-11-29T13:04:14+00:00</updated>
<author>
<name>Vasily Tarasov</name>
<email>vtaras@openvz.org</email>
</author>
<published>2006-11-29T13:04:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b46d1f7bcd9db417ce46463de3bbbb095fe8013a'/>
<id>b46d1f7bcd9db417ce46463de3bbbb095fe8013a</id>
<content type='text'>
elv_iosched_show function iterates other elv_list,
hence elv_list_lock should be got.

Also the question is: in elv_iosched_show, elv_iosched_store
q-&gt;elevator-&gt;elevator_type construction is used without locking q-&gt;queue_lock.
Is it expected?..

Signed-off-by: Vasily Tarasov &lt;vtaras@openvz.org&gt;
Acked-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
elv_iosched_show function iterates other elv_list,
hence elv_list_lock should be got.

Also the question is: in elv_iosched_show, elv_iosched_store
q-&gt;elevator-&gt;elevator_type construction is used without locking q-&gt;queue_lock.
Is it expected?..

Signed-off-by: Vasily Tarasov &lt;vtaras@openvz.org&gt;
Acked-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] limit request_fn recursion</title>
<updated>2006-05-20T22:00:31+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@suse.de</email>
</author>
<published>2006-05-11T06:20:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7984c7b5a2ccd821caeab3d751e0941ca5e8b8d1'/>
<id>7984c7b5a2ccd821caeab3d751e0941ca5e8b8d1</id>
<content type='text'>
Don't recurse back into the driver even if the unplug threshold is met,
when the driver asks for a requeue. This is both silly from a logical
point of view (requeues typically happen due to driver/hardware
shortage), and also dangerous since we could hit an endless request_fn
-&gt; requeue -&gt; unplug -&gt; request_fn loop and crash on stack overrun.

Also limit blk_run_queue() to one level of recursion, similar to how
blk_start_queue() works.

This patch fixed a real problem with SLES10 and lpfc, and it could hit
any SCSI lld that returns non-zero from it's -&gt;queuecommand() handler.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Chris Wright &lt;chrisw@sous-sol.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't recurse back into the driver even if the unplug threshold is met,
when the driver asks for a requeue. This is both silly from a logical
point of view (requeues typically happen due to driver/hardware
shortage), and also dangerous since we could hit an endless request_fn
-&gt; requeue -&gt; unplug -&gt; request_fn loop and crash on stack overrun.

Also limit blk_run_queue() to one level of recursion, similar to how
blk_start_queue() works.

This patch fixed a real problem with SLES10 and lpfc, and it could hit
any SCSI lld that returns non-zero from it's -&gt;queuecommand() handler.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Chris Wright &lt;chrisw@sous-sol.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] block: implement elv_insert and use it (fix ordcolor flipping bug)</title>
<updated>2006-02-08T15:52:58+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>htejun@gmail.com</email>
</author>
<published>2006-02-08T09:01:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=30e9656cc340035e102fea46e1908689494b042d'/>
<id>30e9656cc340035e102fea46e1908689494b042d</id>
<content type='text'>
q-&gt;ordcolor must only be flipped on initial queueing of a hardbarrier
request.

Constructing ordered sequence and requeueing used to pass through
__elv_add_request() which flips q-&gt;ordcolor when it sees a barrier
request.

This patch separates out elv_insert() from __elv_add_request() and uses
elv_insert() when constructing ordered sequence and requeueing.
elv_insert() inserts the given request at the specified position and
does nothing else.

Signed-off-by: Tejun Heo &lt;htejun@gmail.com&gt;
Acked-by: Jens Axboe &lt;axboe@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
q-&gt;ordcolor must only be flipped on initial queueing of a hardbarrier
request.

Constructing ordered sequence and requeueing used to pass through
__elv_add_request() which flips q-&gt;ordcolor when it sees a barrier
request.

This patch separates out elv_insert() from __elv_add_request() and uses
elv_insert() when constructing ordered sequence and requeueing.
elv_insert() inserts the given request at the specified position and
does nothing else.

Signed-off-by: Tejun Heo &lt;htejun@gmail.com&gt;
Acked-by: Jens Axboe &lt;axboe@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] block: request_queue-&gt;ordcolor must not be flipped on SOFTBARRIER</title>
<updated>2006-02-05T19:06:51+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>htejun@gmail.com</email>
</author>
<published>2006-02-05T07:27:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=238e7db9357bfe1ce3d6f7ac1e60e595e9d46b7b'/>
<id>238e7db9357bfe1ce3d6f7ac1e60e595e9d46b7b</id>
<content type='text'>
q-&gt;ordcolor must not be flipped on SOFTBARRIER.

Signed-off-by: Tejun Heo &lt;htejun@gmail.com&gt;
Acked-by: Jens Axboe &lt;axboe@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
q-&gt;ordcolor must not be flipped on SOFTBARRIER.

Signed-off-by: Tejun Heo &lt;htejun@gmail.com&gt;
Acked-by: Jens Axboe &lt;axboe@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[BLOCK] elevator: allow default scheduler to potentially be modular</title>
<updated>2006-01-24T09:09:14+00:00</updated>
<author>
<name>Nate Diller</name>
<email>nate.diller@gmail.com</email>
</author>
<published>2006-01-24T09:09:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=248d5ca5ed5feb7f1a68d213c0ff89c604a97179'/>
<id>248d5ca5ed5feb7f1a68d213c0ff89c604a97179</id>
<content type='text'>
Jens has decided that allowing the default scheduler to be a module is
a bug, and should not be allowed under kconfig.  However, I find that
scenario useful for debugging, and wish for the kernel to be able to
handle this situation without OOPSing, if I enable such an option in
the .config directly.  This patch dynamically checks for the presence
of the compiled-in default, and falls back to no-op, emitting a
suitable error message, when the default is not available

Tested for a range of boot options on 2.6.16-rc1-mm2.

Signed-off-by: Nate Diller &lt;nate.diller@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Jens has decided that allowing the default scheduler to be a module is
a bug, and should not be allowed under kconfig.  However, I find that
scenario useful for debugging, and wish for the kernel to be able to
handle this situation without OOPSing, if I enable such an option in
the .config directly.  This patch dynamically checks for the presence
of the compiled-in default, and falls back to no-op, emitting a
suitable error message, when the default is not available

Tested for a range of boot options on 2.6.16-rc1-mm2.

Signed-off-by: Nate Diller &lt;nate.diller@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[BLOCK] elevator: default choice selection</title>
<updated>2006-01-24T09:07:58+00:00</updated>
<author>
<name>Nate Diller</name>
<email>nate.diller@gmail.com</email>
</author>
<published>2006-01-24T09:07:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5f00397644e01adfbebafb5d0ebc01eba522709d'/>
<id>5f00397644e01adfbebafb5d0ebc01eba522709d</id>
<content type='text'>
My previous default iosched patch did a poor job dealing with the
'elevator=' boot-time option.  The old behavior falls back to the
compiled-in default if the requested one is not registered at boot
time.  This patch dynamically evaluates which default
to use, and emits a suitable error message when the requested scheduler
is not available.  It also does the 'as' -&gt; 'anticipatory' conversion
before elevator registration, which along with a modified registration
function, allows it to correctly indicate which default scheduler is
in use.

Tested for a range of boot options on 2.6.16-rc1-mm2.

Signed-off-by: Nate Diller &lt;nate.diller@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
My previous default iosched patch did a poor job dealing with the
'elevator=' boot-time option.  The old behavior falls back to the
compiled-in default if the requested one is not registered at boot
time.  This patch dynamically evaluates which default
to use, and emits a suitable error message when the requested scheduler
is not available.  It also does the 'as' -&gt; 'anticipatory' conversion
before elevator registration, which along with a modified registration
function, allows it to correctly indicate which default scheduler is
in use.

Tested for a range of boot options on 2.6.16-rc1-mm2.

Signed-off-by: Nate Diller &lt;nate.diller@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[BLOCK] elevator: if specified scheduler is not found, fall back to default</title>
<updated>2006-01-16T08:48:58+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@suse.de</email>
</author>
<published>2006-01-16T08:48:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b7bfcf7cbd58d2a64aa46f3b4bec921e346e604f'/>
<id>b7bfcf7cbd58d2a64aa46f3b4bec921e346e604f</id>
<content type='text'>
Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[BLOCK] elevator: Make elevator=as work again for anticipatory</title>
<updated>2006-01-16T08:47:37+00:00</updated>
<author>
<name>Chuck Ebbert</name>
<email>76306.1226@compuserve.com</email>
</author>
<published>2006-01-16T08:47:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=752a3b79630a290cbbe4731e7c61b75d4fbebc5c'/>
<id>752a3b79630a290cbbe4731e7c61b75d4fbebc5c</id>
<content type='text'>
Signed-off-by: Chuck Ebbert &lt;76306.1226@compuserve.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Chuck Ebbert &lt;76306.1226@compuserve.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] fix queue stalling while barrier sequencing</title>
<updated>2006-01-12T17:05:39+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>htejun@gmail.com</email>
</author>
<published>2006-01-12T14:39:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1bc691d357c646700b9523d2aeca02847d3fb3f4'/>
<id>1bc691d357c646700b9523d2aeca02847d3fb3f4</id>
<content type='text'>
If ordered tag isn't supported, request ordering for barrier
sequencing is performed by queue draining, which basically hangs the
request queue until elv_completed_request() reports completion of all
previous fs requests.

The condition check in elv_completed_request() was only performed for
fs requests.  If a special request is queued between the last
to-be-drained request and the barrier sequence, draining is never
completed and the queue is stalled forever.

This patch moves the end-of-draining condition check such that it's
performed for all requests.

Signed-off-by: Tejun Heo &lt;htejun@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If ordered tag isn't supported, request ordering for barrier
sequencing is performed by queue draining, which basically hangs the
request queue until elv_completed_request() reports completion of all
previous fs requests.

The condition check in elv_completed_request() was only performed for
fs requests.  If a special request is queued between the last
to-be-drained request and the barrier sequence, draining is never
completed and the queue is stalled forever.

This patch moves the end-of-draining condition check such that it's
performed for all requests.

Signed-off-by: Tejun Heo &lt;htejun@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
