linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Bart Van Assche <Bart.VanAssche@wdc.com>
Cc: "martin@lichtvoll.de" <martin@lichtvoll.de>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"hare@suse.com" <hare@suse.com>,
	"oleksandr@natalenko.name" <oleksandr@natalenko.name>,
	"willy@infradead.org" <willy@infradead.org>,
	"axboe@kernel.dk" <axboe@kernel.dk>
Subject: Re: Block layer use of __GFP flags
Date: Mon, 9 Apr 2018 19:31:59 +0200	[thread overview]
Message-ID: <20180409173158.GN21835@dhcp22.suse.cz> (raw)
In-Reply-To: <0dc5f067247d10f7e3c60f544b2a9019c898fbad.camel@wdc.com>

On Mon 09-04-18 15:03:45, Bart Van Assche wrote:
> On Mon, 2018-04-09 at 11:00 +0200, Michal Hocko wrote:
> > On Mon 09-04-18 04:46:22, Bart Van Assche wrote:
> > [...]
> > [...]
> > > diff --git a/drivers/ide/ide-pm.c b/drivers/ide/ide-pm.c
> > > index ad8a125defdd..3ddb464b72e6 100644
> > > --- a/drivers/ide/ide-pm.c
> > > +++ b/drivers/ide/ide-pm.c
> > > @@ -91,7 +91,7 @@ int generic_ide_resume(struct device *dev)
> > >  
> > >  	memset(&rqpm, 0, sizeof(rqpm));
> > >  	rq = blk_get_request_flags(drive->queue, REQ_OP_DRV_IN,
> > > -				   BLK_MQ_REQ_PREEMPT);
> > > +				   BLK_MQ_REQ_PREEMPT, __GFP_RECLAIM);
> > 
> > Is there any reason to use __GFP_RECLAIM directly. I guess you wanted to
> > have GFP_NOIO semantic, right? So why not be explicit about that. Same
> > for other instances of this flag in the patch
> 
> Hello Michal,
> 
> Thanks for the review. The use of __GFP_RECLAIM in this code (which was
> called __GFP_WAIT in the past) predates the git history.

Yeah, __GFP_WAIT -> __GFP_RECLAIM was a pseudo automated change IIRC.
Anyway GFP_NOIO should be pretty much equivalent and self explanatory.
__GFP_RECLAIM is more of an internal thing than something be for used as
a plain gfp mask.

Sure, there is no real need to change that but if you want to make the
code more neat and self explanatory I would go with GFP_NOIO.

Just my 2c
-- 
Michal Hocko
SUSE Labs

      reply	other threads:[~2018-04-09 17:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-08  6:54 Block layer use of __GFP flags Matthew Wilcox
2018-04-08 16:40 ` Bart Van Assche
2018-04-08 19:08   ` Matthew Wilcox
2018-04-09  4:46     ` Bart Van Assche
2018-04-09  6:53       ` Hannes Reinecke
2018-04-09  8:26         ` Christoph Hellwig
2018-04-09 15:11           ` Matthew Wilcox
2018-04-09 15:15           ` Bart Van Assche
2018-04-09  9:00       ` Michal Hocko
2018-04-09 15:03         ` Bart Van Assche
2018-04-09 17:31           ` Michal Hocko [this message]

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=20180409173158.GN21835@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=Bart.VanAssche@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=hare@suse.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=martin@lichtvoll.de \
    --cc=oleksandr@natalenko.name \
    --cc=willy@infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).