mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	"Rafael J. Wysocki" <rjw@sisk.pl>, jurriaan <thunder7@xs4all.nl>,
	linux-kernel@vger.kernel.org
Subject: Re: 2.6.27-rc4: lots of 'in_atomic():1, irqs_disabled():0' with  software-raid1
Date: Thu, 28 Aug 2008 18:27:13 +1000	[thread overview]
Message-ID: <18614.24929.952454.829021@notabene.brown> (raw)
In-Reply-To: message from Jens Axboe on Thursday August 28

On Thursday August 28, jens.axboe@oracle.com wrote:
> On Thu, Aug 28 2008, Andrew Morton wrote:
> > 
> > Cant sleep inside rcu_read_lock(), with CONFIG_PREEMPT_RCU=n, at least.
> > 
> > Dunno if it's legal if CONFIG_PREEMPT_RCU=y.  Hopefully not - that
> > would be insane.  But I've failed to keep up with rcu goings-on
> > recently.
> 
> Doh right, we of course can't block inside a RCU section. Then
> bitmap.c:write_sb_page() wants fixing:
> 
>         rcu_read_lock();
>         rdev_for_each_rcu(...)
>                 md_super_write(...)
>                         bio_alloc(GFP_NOIO, 1);
> 
> Neil?


Yes......

And not only can't I call bio_alloc inside the rcu_read_lock, I also
cannot call submit_bio, as that can do a mempool alloc for a request
structure.
I can get around that by putting the bios on the ->biolist that
md_super_wait will resubmit requests from.  But I still need to
allocate those bios.
Maybe I can count how many there need to be, then allocate them and
make a list, then pass them down into md_super_write.
It's a bit ugly but it should work.

I think I'll have to think about it a bit more.

Thanks,
NeilBrown

  parent reply	other threads:[~2008-08-28  8:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-27 17:05 jurriaan
2008-08-27 21:47 ` Rafael J. Wysocki
2008-08-28  7:33   ` Jens Axboe
2008-08-28  7:45     ` Andrew Morton
2008-08-28  7:48       ` Jens Axboe
2008-08-28  7:56         ` Andre Noll
2008-08-28  8:11           ` Jens Axboe
2008-08-28  8:04             ` Andre Noll
2008-08-28  8:27         ` Neil Brown [this message]
2008-08-28  8:36           ` Jens Axboe
2008-08-28  9:00           ` Andrew Morton
2008-08-29  7:36             ` Neil Brown
2008-08-29  7:47               ` Jens Axboe
2008-08-29  8:14               ` Andrew Morton
2008-08-29  5:44           ` Neil Brown
2008-08-29  5:48             ` Neil Brown
2008-08-29  7:11               ` Jens Axboe

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=18614.24929.952454.829021@notabene.brown \
    --to=neilb@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=thunder7@xs4all.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®