From: Matthew Wilcox <willy@infradead.org>
To: Vasily Averin <vvs@openvz.org>
Cc: kernel@openvz.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org,
Johannes Weiner <hannes@cmpxchg.org>,
Shakeel Butt <shakeelb@google.com>
Subject: Re: [PATCH] XArray: handle XA_FLAGS_ACCOUNT in xas_split_alloc
Date: Fri, 27 May 2022 02:21:46 +0100 [thread overview]
Message-ID: <YpAnqqY/c3Y5ZkPG@casper.infradead.org> (raw)
In-Reply-To: <348dc099-737d-94ba-55ad-2db285084c73@openvz.org>
On Wed, May 25, 2022 at 11:26:37AM +0300, Vasily Averin wrote:
> Commit 7b785645e8f1 ("mm: fix page cache convergence regression")
> added support of new XA_FLAGS_ACCOUNT flag into all Xarray allocation
> functions. Later commit 8fc75643c5e1 ("XArray: add xas_split")
> introduced xas_split_alloc() but missed about XA_FLAGS_ACCOUNT
> processing.
Thanks, Vasily.
Johannes, Shakeel, is this right? I don't fully understand the accounting
stuff.
> Signed-off-by: Vasily Averin <vvs@openvz.org>
> ---
> lib/xarray.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/lib/xarray.c b/lib/xarray.c
> index 54e646e8e6ee..5f5b42e6f842 100644
> --- a/lib/xarray.c
> +++ b/lib/xarray.c
> @@ -1013,6 +1013,8 @@ void xas_split_alloc(struct xa_state *xas, void *entry, unsigned int order,
> if (xas->xa_shift + XA_CHUNK_SHIFT > order)
> return;
>
> + if (xas->xa->xa_flags & XA_FLAGS_ACCOUNT)
> + gfp |= __GFP_ACCOUNT;
> do {
> unsigned int i;
> void *sibling = NULL;
> --
> 2.31.1
>
next prev parent reply other threads:[~2022-05-27 1:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-25 8:26 [PATCH] XArray: handle XA_FLAGS_ACCOUNT in xas_split_alloc Vasily Averin
2022-05-27 1:21 ` Matthew Wilcox [this message]
2022-05-27 1:40 ` Shakeel Butt
2022-05-27 11:22 ` Vasily Averin
2022-05-27 17:47 ` Roman Gushchin
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=YpAnqqY/c3Y5ZkPG@casper.infradead.org \
--to=willy@infradead.org \
--cc=hannes@cmpxchg.org \
--cc=kernel@openvz.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shakeelb@google.com \
--cc=vvs@openvz.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).