mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Kevin Corry <kevcorry@us.ibm.com>
Cc: linux-kernel@vger.kernel.org, miquels@cistron.nl
Subject: Re: 2.6.4-rc1-mm1: queue-congestion-dm-implementation patch
Date: Tue, 2 Mar 2004 14:21:34 -0800	[thread overview]
Message-ID: <20040302142134.4074cd2f.akpm@osdl.org> (raw)
In-Reply-To: <200403020826.52448.kevcorry@us.ibm.com>

Kevin Corry <kevcorry@us.ibm.com> wrote:
>
> > Changing down_read() in dm_any_congested to down_read_trylock() would
> > probably fix it for bdi_*_congested(). If you can tell me how to
> > reproduce it I can try a few things..
> 
> Switching to down_read_trylock() would certainly eliminate this problem, as 
> long as you don't *need* to check the congestion of the underlying devices 
> each time dm_any_congested() is called.

It's clear from the trace: we're doing down_read() inside
sync_sb_inodes()'s inode_lock.

Yes, a trylock would fix it up, but it's a bit sleazy.

And we might have another problem here: we're thnking about removing the
global plugging queue and switching disk plugging over to being a
per-address_space thing.  So blk_run_queues() goes away and is replaced with

	mapping->backing_dev_info.unplug(&mapping->backing_dev_info);

so we only unplug the queues which back the relevant address_space.

The top-level code will take the top-level queue's lock, and the
devicemapper's implementation of backing_dev_info.unplug() will be called
under the top-level queue lock and will need to perform the same
devicemapper table walk.  A trylock here will not be acceptable: if it
fails, a process hangs up for seconds or even minutes.

So for two reasons now, it's looking like that semaphore which protects the
devicemapper tables needs to become a spinlock.  One which has interesting
ranking properties.


  reply	other threads:[~2004-03-02 22:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cistron.200403011400.51008.kevcorry@us.ibm.com>
2004-03-01 20:00 ` Kevin Corry
2004-03-02 13:01   ` Miquel van Smoorenburg
2004-03-02 14:26     ` Kevin Corry
2004-03-02 22:21       ` Andrew Morton [this message]
2004-03-03  0:15         ` Miquel van Smoorenburg

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=20040302142134.4074cd2f.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=kevcorry@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miquels@cistron.nl \
    /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

all inboxes | Powered by JetHome®