All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Anand Jain <anand.jain@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>, Liu Bo <bo.li.liu@oracle.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/8] btrfs: bioset allocations will never fail, adapt our helpers
Date: Tue, 6 Jun 2017 12:51:49 +0200	[thread overview]
Message-ID: <20170606105149.GZ12135@suse.cz> (raw)
In-Reply-To: <0fb07221-b538-ccc3-c910-296d97ea64aa@oracle.com>

On Tue, Jun 06, 2017 at 06:21:17PM +0800, Anand Jain wrote:
> On 06/03/17 00:58, David Sterba wrote:
> > Christoph pointed out that bio allocations backed by a bioset will never
> > fail.
> 
>   Looks like this feature comes when  __GFP_DIRECT_RECLAIM is
>   set and we aren't, such as [1]. Any idea why? Looks like I am
>   missing something ?

bio_alloc_bioset:

 406  *   When @bs is not NULL, if %__GFP_DIRECT_RECLAIM is set then bio_alloc will
 407  *   always be able to allocate a bio. This is due to the mempool guarantees.

> [1]
> -----
> static int submit_extent_page(int op, int op_flags, struct 
> extent_io_tree *tree,
> ::
> 
>   bio = btrfs_bio_alloc(bdev, sector, BIO_MAX_PAGES,
>                  GFP_NOFS | __GFP_HIGH);

GFP_NOFS contains __GFP_DIRECT_RECLAIM, so what's the problem? __GFP_HIGH
allows using the reserves, but should not otherwise change the constraints.
And it's use seems unnecessary, as far as I could track in the history.

  parent reply	other threads:[~2017-06-06 10:52 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-02 16:58 [PATCH 0/8] Bio allocation and error handling cleanups David Sterba
2017-06-02 16:58 ` [PATCH 1/8] btrfs: bioset allocations will never fail, adapt our helpers David Sterba
2017-06-03  5:10   ` Christoph Hellwig
2017-06-06 10:21   ` Anand Jain
2017-06-06 10:44     ` Christoph Hellwig
2017-06-07  6:52       ` Anand Jain
2017-06-06 10:51     ` David Sterba [this message]
2017-06-07  9:10   ` Anand Jain
2017-06-02 16:58 ` [PATCH 2/8] btrfs: btrfs_bio_alloc never fails, skip error handling David Sterba
2017-06-07  9:11   ` Anand Jain
2017-06-02 16:58 ` [PATCH 3/8] btrfs: btrfs_bio_clone " David Sterba
2017-06-07  9:11   ` Anand Jain
2017-06-07 18:19   ` Omar Sandoval
2017-06-12 13:13     ` David Sterba
2017-06-02 16:58 ` [PATCH 4/8] btrfs: btrfs_io_bio_alloc " David Sterba
2017-06-07  9:11   ` Anand Jain
2017-06-02 16:58 ` [PATCH 5/8] btrfs: sink gfp parameter to btrfs_bio_clone David Sterba
2017-06-07  9:12   ` Anand Jain
2017-06-02 16:58 ` [PATCH 6/8] btrfs: remove redundant parameters from btrfs_bio_alloc David Sterba
2017-06-07  7:40   ` Anand Jain
2017-06-12 13:09     ` David Sterba
2017-06-02 16:58 ` [PATCH 7/8] btrfs: opencode trivial compressed_bio_alloc, simplify error handling David Sterba
2017-06-07  9:21   ` Anand Jain
2017-06-02 16:58 ` [PATCH 8/8] btrfs: pass bytes to btrfs_bio_alloc David Sterba
2017-06-07  9:22   ` Anand Jain

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=20170606105149.GZ12135@suse.cz \
    --to=dsterba@suse.cz \
    --cc=anand.jain@oracle.com \
    --cc=bo.li.liu@oracle.com \
    --cc=hch@lst.de \
    --cc=linux-btrfs@vger.kernel.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 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.