* [RFC]md: using GFP_NOIO to allocate bio for flush request
@ 2012-04-16 5:32 Shaohua Li
2012-05-08 10:18 ` Shaohua Li
0 siblings, 1 reply; 4+ messages in thread
From: Shaohua Li @ 2012-04-16 5:32 UTC (permalink / raw)
To: linux-raid@vger.kernel.org, neilb@suse.de
flush request is issued in transaction commit code path usually, so
looks using
GFP_KERNEL to allocate memory for flush request bio falls into the classic
deadlock issue. dm already gets it right.
Signed-off-by: Shaohua Li <shli@fusionio.com>
---
drivers/md/md.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux/drivers/md/md.c
===================================================================
--- linux.orig/drivers/md/md.c 2012-04-13 10:03:58.395497650 +0800
+++ linux/drivers/md/md.c 2012-04-13 10:04:37.445497882 +0800
@@ -450,7 +450,7 @@ static void submit_flushes(struct work_s
atomic_inc(&rdev->nr_pending);
atomic_inc(&rdev->nr_pending);
rcu_read_unlock();
- bi = bio_alloc_mddev(GFP_KERNEL, 0, mddev);
+ bi = bio_alloc_mddev(GFP_NOIO, 0, mddev);
bi->bi_end_io = md_end_flush;
bi->bi_private = rdev;
bi->bi_bdev = rdev->bdev;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC]md: using GFP_NOIO to allocate bio for flush request
2012-04-16 5:32 [RFC]md: using GFP_NOIO to allocate bio for flush request Shaohua Li
@ 2012-05-08 10:18 ` Shaohua Li
2012-05-08 19:31 ` Dan Williams
0 siblings, 1 reply; 4+ messages in thread
From: Shaohua Li @ 2012-05-08 10:18 UTC (permalink / raw)
To: linux-raid@vger.kernel.org, neilb@suse.de
On Mon, Apr 16, 2012 at 01:32:06PM +0800, Shaohua Li wrote:
>
> flush request is issued in transaction commit code path usually, so
> looks using
> GFP_KERNEL to allocate memory for flush request bio falls into the classic
> deadlock issue. dm already gets it right.
ping!
> Signed-off-by: Shaohua Li <shli@fusionio.com>
> ---
> drivers/md/md.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: linux/drivers/md/md.c
> ===================================================================
> --- linux.orig/drivers/md/md.c 2012-04-13 10:03:58.395497650 +0800
> +++ linux/drivers/md/md.c 2012-04-13 10:04:37.445497882 +0800
> @@ -450,7 +450,7 @@ static void submit_flushes(struct work_s
> atomic_inc(&rdev->nr_pending);
> atomic_inc(&rdev->nr_pending);
> rcu_read_unlock();
> - bi = bio_alloc_mddev(GFP_KERNEL, 0, mddev);
> + bi = bio_alloc_mddev(GFP_NOIO, 0, mddev);
> bi->bi_end_io = md_end_flush;
> bi->bi_private = rdev;
> bi->bi_bdev = rdev->bdev;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC]md: using GFP_NOIO to allocate bio for flush request
2012-05-08 10:18 ` Shaohua Li
@ 2012-05-08 19:31 ` Dan Williams
2012-05-08 20:14 ` NeilBrown
0 siblings, 1 reply; 4+ messages in thread
From: Dan Williams @ 2012-05-08 19:31 UTC (permalink / raw)
To: Shaohua Li; +Cc: linux-raid@vger.kernel.org, neilb@suse.de
On Tue, May 8, 2012 at 3:18 AM, Shaohua Li <shli@kernel.org> wrote:
> On Mon, Apr 16, 2012 at 01:32:06PM +0800, Shaohua Li wrote:
>>
>> flush request is issued in transaction commit code path usually, so
>> looks using
>> GFP_KERNEL to allocate memory for flush request bio falls into the classic
>> deadlock issue. dm already gets it right.
> ping!
>
This one should probably also be queued for -stable right?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC]md: using GFP_NOIO to allocate bio for flush request
2012-05-08 19:31 ` Dan Williams
@ 2012-05-08 20:14 ` NeilBrown
0 siblings, 0 replies; 4+ messages in thread
From: NeilBrown @ 2012-05-08 20:14 UTC (permalink / raw)
To: Dan Williams; +Cc: Shaohua Li, linux-raid@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 720 bytes --]
On Tue, 8 May 2012 12:31:18 -0700 Dan Williams <dan.j.williams@intel.com>
wrote:
> On Tue, May 8, 2012 at 3:18 AM, Shaohua Li <shli@kernel.org> wrote:
> > On Mon, Apr 16, 2012 at 01:32:06PM +0800, Shaohua Li wrote:
> >>
> >> flush request is issued in transaction commit code path usually, so
> >> looks using
> >> GFP_KERNEL to allocate memory for flush request bio falls into the classic
> >> deadlock issue. dm already gets it right.
> > ping!
> >
>
> This one should probably also be queued for -stable right?
I suspect so.
I've edited the commit-log message slightly and added a 'cc' for stable,
It is now in my for-next branch. I'll push to Linus next week.
Thanks Shaohua,
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-05-08 20:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-16 5:32 [RFC]md: using GFP_NOIO to allocate bio for flush request Shaohua Li
2012-05-08 10:18 ` Shaohua Li
2012-05-08 19:31 ` Dan Williams
2012-05-08 20:14 ` NeilBrown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).