From: Matthew Wilcox <willy@infradead.org>
To: Tim Chen <tim.c.chen@linux.intel.com>
Cc: linux-mm@kvack.org, Jan Kara <jack@suse.cz>
Subject: Re: [PATCH 1/2] pagevec: Allow pagevecs to be different sizes
Date: Sat, 7 Nov 2020 01:21:12 +0000 [thread overview]
Message-ID: <20201107012112.GU17076@casper.infradead.org> (raw)
In-Reply-To: <400d19a9-1113-5903-053e-85100104d229@linux.intel.com>
On Fri, Nov 06, 2020 at 02:18:40PM -0800, Tim Chen wrote:
> On 11/6/20 11:12 AM, Matthew Wilcox wrote:
> > I have a number of changes already in that area that are currently in-flight.
> > https://lore.kernel.org/linux-mm/20201026041408.25230-1-willy@infradead.org/
> >
> > (although I should modify patch 9/12 to not use PAGEVEC_SIZE directly)
>
> Okay. I assume that you are using pagevec_size somewhere to replace those
> hardcoded PAGEVEC_SIZE somewhere.
Ah. I felt I should add it, as a counterpart to pagevec_count().
But most users don't need to ask what size the pagevec is; they just
add pages to it until it's full. eg:
pvec = this_cpu_ptr(&lru_pvecs.lru_add);
if (!pagevec_add(pvec, page) || PageCompound(page))
__pagevec_lru_add(pvec);
so as long as it's right in pagevec_add(), it'll be fine:
static inline unsigned pagevec_add(struct pagevec *pvec, struct page *page)
{
pvec->pages[pvec->nr++] = page;
return pagevec_space(pvec);
}
and I fix pagevec_space in patch 1:
return pvec->sz - pvec->nr;
next prev parent reply other threads:[~2020-11-07 1:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-05 17:26 [PATCH 0/2] Increase the size of LRU pagevecs Matthew Wilcox (Oracle)
2020-11-05 17:26 ` [PATCH 1/2] pagevec: Allow pagevecs to be different sizes Matthew Wilcox (Oracle)
2020-11-06 17:17 ` Tim Chen
2020-11-06 19:12 ` Matthew Wilcox
2020-11-06 22:18 ` Tim Chen
2020-11-07 1:21 ` Matthew Wilcox [this message]
2020-11-05 17:26 ` [PATCH 2/2] pagevec: Increase the size of LRU pagevecs Matthew Wilcox (Oracle)
2020-11-06 0:51 ` [PATCH 0/2] " Tim Chen
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=20201107012112.GU17076@casper.infradead.org \
--to=willy@infradead.org \
--cc=jack@suse.cz \
--cc=linux-mm@kvack.org \
--cc=tim.c.chen@linux.intel.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 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).