From: Nick Piggin <piggin@cyberone.com.au>
To: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: blk_congestion_wait racy?
Date: Tue, 09 Mar 2004 10:50:02 +1100 [thread overview]
Message-ID: <404D06AA.6070100@cyberone.com.au> (raw)
In-Reply-To: <OF335311D8.7BCE1E48-ONC1256E51.0049DBF1-C1256E51.004AEA2A@de.ibm.com>
Martin Schwidefsky wrote:
>
>
>
>>Gad, that'll make the VM scan its guts out.
>>
>Yes, I expected something like this.
>
>
>>>2.6.4-rc2 + "fix" with 1 cpu
>>>sys 0m0.880s
>>>
>>>2.6.4-rc2 + "fix" with 2 cpu
>>>sys 0m1.560s
>>>
>>system time was doubled though.
>>
>That would be the additional cost for not waiting.
>
>
I'd say its more like cacheline contention or something: reclaim
won't simply be spinning with nothing to do because you're dirtying
plenty of memory. And if any queues were full it will mostly just be
blocking in the block layer.
>>Nope, something is obviously broken. I'll take a look.
>>
>That would be very much appreciated.
>
I'm looking at 2.6.1 source, so apologies if I'm wrong, but
drivers/block/ll_rw_blk.c:
freed_request does not need the memory barrier because the queue is
protected by the per queue spinlock. And I think clear_queue_congested
should have a memory barrier right before if (waitqueue_active(wqh)).
Another problem is that if there are no requests anywhere in the system,
sleepers in blk_congestion_wait will not get kicked. blk_congestion_wait
could probably have blk_run_queues moved after prepare_to_wait, which
might help.
Just some ideas.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
next prev parent reply other threads:[~2004-03-08 23:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-08 13:38 Martin Schwidefsky
2004-03-08 23:50 ` Nick Piggin [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-03-11 19:04 Martin Schwidefsky
2004-03-11 23:25 ` Andrew Morton
2004-03-12 2:31 ` Nick Piggin
2004-03-11 18:24 Martin Schwidefsky
2004-03-11 18:55 ` Andrew Morton
2004-03-09 17:54 Martin Schwidefsky
2004-03-10 5:23 ` Nick Piggin
2004-03-10 5:35 ` Andrew Morton
2004-03-10 5:47 ` Nick Piggin
2004-03-08 9:59 Martin Schwidefsky
2004-03-08 12:24 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=404D06AA.6070100@cyberone.com.au \
--to=piggin@cyberone.com.au \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=schwidefsky@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox