All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Damien Le Moal <Damien.LeMoal@wdc.com>
Cc: Christoph Hellwig <hch@lst.de>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	Jens Axboe <axboe@kernel.dk>,
	Bart Van Assche <bvanassche@acm.org>
Subject: Re: [PATCH V5 2/3] sd_zbc: Fix report zones buffer allocation
Date: Fri, 28 Jun 2019 09:44:50 +0200	[thread overview]
Message-ID: <20190628074450.GA29550@lst.de> (raw)
In-Reply-To: <BYAPR04MB581641F8E665ECD324B6C397E7FC0@BYAPR04MB5816.namprd04.prod.outlook.com>

On Fri, Jun 28, 2019 at 07:30:49AM +0000, Damien Le Moal wrote:
> 
> Yes, indeed. However, removing the gfp_flags from report_zones method
> would limit possibilities to only GFP_NOIO or GFP_KERNEL (default
> vmalloc). What if the caller is an FS and needs GFP_NOFS, or any other
> reclaim flags ? Handling all possibilities does not seem reasonable.
> Handling only GFP_KERNEL and GFP_IO is easy, but that would mean that
> the caller of blkdev_report_zones would need to do itself calls to
> whatever  memalloc_noXX_save/restore() it needs. Is that OK ?

I think it is ok.  The only real possibily is noio anyway as far as
I can tell.

> 
> Currently, blkdev_report_zones() uses only either GFP_KERNEL (general
> case, fs, dm and user ioctl), or GFP_NOIO for revalidate, disk scan and
> dm-zoned error path. So removing the flag from the report zones method
> while keeping it in the block layer API to distinguished these cases is
> simple, but I am not sure if that will not pause problems for some
> users. Thoughts ?

I'd kill it from the block layer API and require the caller to set
the per-task flag.  If I understood the mm maintainers correctly the
long term plan is to kill of GFP_NOFS and GFP_NOIO flowly and just rely
on the contexts.

  reply	other threads:[~2019-06-28  7:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-27  9:29 [PATCH V5 0/3] Fix zone revalidation memory allocation failures Damien Le Moal
2019-06-27  9:29 ` [PATCH V5 1/3] block: Allow mapping of vmalloc-ed buffers Damien Le Moal
2019-06-27 14:06   ` Christoph Hellwig
2019-06-27 17:09   ` Chaitanya Kulkarni
2019-06-28  0:12   ` Ming Lei
2019-06-27  9:29 ` [PATCH V5 2/3] sd_zbc: Fix report zones buffer allocation Damien Le Moal
2019-06-27 14:09   ` Christoph Hellwig
2019-06-28  7:30     ` Damien Le Moal
2019-06-28  7:44       ` Christoph Hellwig [this message]
2019-06-28  7:57         ` Damien Le Moal
2019-06-28  8:03           ` Christoph Hellwig
2019-06-27  9:29 ` [PATCH V5 3/3] block: Limit zone array allocation size Damien Le Moal
2019-06-27 17:08   ` Chaitanya Kulkarni

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=20190628074450.GA29550@lst.de \
    --to=hch@lst.de \
    --cc=Damien.LeMoal@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.