[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zadk/BR4gFG07BVE@memverge.com>
Date: Wed, 17 Jan 2024 00:26:20 -0500
From: Gregory Price <gregory.price@...verge.com>
To: "Huang, Ying" <ying.huang@...el.com>
Cc: Gregory Price <gourry.memverge@...il.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-api@...r.kernel.org,
corbet@....net, akpm@...ux-foundation.org, honggyu.kim@...com,
rakie.kim@...com, hyeongtak.ji@...com, mhocko@...nel.org,
vtavarespetr@...ron.com, jgroves@...ron.com,
ravis.opensrc@...ron.com, sthanneeru@...ron.com,
emirakhur@...ron.com, Hasan.Maruf@....com, seungjun.ha@...sung.com,
hannes@...xchg.org, dan.j.williams@...el.com
Subject: Re: [PATCH 2/3] mm/mempolicy: refactor a read-once mechanism into a
function for re-use
On Mon, Jan 15, 2024 at 12:13:06PM +0800, Huang, Ying wrote:
> Gregory Price <gourry.memverge@...il.com> writes:
>
> >
> > +static unsigned int read_once_policy_nodemask(struct mempolicy *pol,
> > + nodemask_t *mask)
>
> It may be more useful if we define this as memcpy_once(). That can be
> used not only for nodemask, but also other data structure.
>
Seemed better to do this is an entirely separate patch line to avoid
scope creep on reviews and such.
> > + barrier();
> > + __builtin_memcpy(mask, &pol->nodes, sizeof(nodemask_t));
>
> We don't use __builtin_memcpy() in kernel itself directly. Although it
> is used in kernel tools. So, I think it's better to use memcpy() here.
>
ack.
~Gregory
Powered by blists - more mailing lists