From: Christoph Hellwig <hch@infradead.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: Christoph Hellwig <hch@infradead.org>,
"Darrick J. Wong" <darrick.wong@oracle.com>,
linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] iomap: Do not use GFP_NORETRY to allocate BIOs
Date: Mon, 23 Mar 2020 09:51:54 -0700 [thread overview]
Message-ID: <20200323165154.GB30433@infradead.org> (raw)
In-Reply-To: <20200323151054.GI4971@bombadil.infradead.org>
On Mon, Mar 23, 2020 at 08:10:54AM -0700, Matthew Wilcox wrote:
> > That looks silly to me. This just means we'll keep iterating over
> > small bios for readahead.. Either we just ignore the different gfp
> > mask, or we need to go all the way and handle errors, although that
> > doesn't really look nice.
>
> I'm not sure it's silly,
Oh well, I'm not going to be in the way of fixing a bug I added. So
feel free to go ahead with this and mention it matches mpage_readpages.
> although I'd love to see bio_alloc() support
> nr_iovecs == 0 meaning "allocate me any size biovec and tell me what
> size I got in ->bi_max_vecs". By allocating a small biovec this time,
> we do one allocation rather than two, and maybe by the time we come to
> allocate the next readahead bio, kswapd will have succeeded in freeing
> up more memory for us.
Sounds easy enough - especially as callers don't need to look at
bi_max_vecs anyway, that is the job of bio_add_page and friends. That
being said an upper bound still sounds useful - no need to allocate
a a gigantic bio if we know we only need a few pages.
next prev parent reply other threads:[~2020-03-23 16:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-23 13:12 [PATCH] iomap: Do not use GFP_NORETRY to allocate BIOs Matthew Wilcox
2020-03-23 13:20 ` Christoph Hellwig
2020-03-23 13:40 ` Matthew Wilcox
2020-03-23 13:55 ` Christoph Hellwig
2020-03-23 15:10 ` Matthew Wilcox
2020-03-23 16:51 ` Christoph Hellwig [this message]
2020-03-31 9:21 ` Christoph Hellwig
2020-03-23 15:38 ` Darrick J. Wong
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=20200323165154.GB30433@infradead.org \
--to=hch@infradead.org \
--cc=darrick.wong@oracle.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--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).