lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 23 Jan 2024 16:35:19 +0800
From: "Huang, Ying" <ying.huang@...el.com>
To: Gregory Price <gregory.price@...verge.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>,  Srinivasulu Thanneeru
 <sthanneeru.opensrc@...ron.com>
Subject: Re: [PATCH v2 3/3] mm/mempolicy: introduce MPOL_WEIGHTED_INTERLEAVE
 for weighted interleaving

Gregory Price <gregory.price@...verge.com> writes:

> On Mon, Jan 22, 2024 at 11:54:34PM -0500, Gregory Price wrote:
>> > 
>> > Can the above code be simplified as something like below?
>> > 
>> >         resume_node = prev_node;
> ---         resume_weight = 0;
> +++         resume_weight = weights[node];
>> >         for (...) {
>> >                 ...
>> >         }
>> > 
>> 
>> I'll take another look at it, but this logic is annoying because of the
>> corner case:  me->il_prev can be NUMA_NO_NODE or an actual numa node.
>> 
>
> After a quick look, as long as no one objects to (me->il_prev) remaining
> NUMA_NO_NODE

MAX_NUMNODES-1 ?

> while having a weight assigned to pol->wil.cur_weight,

I think that it is OK.

And, IIUC, pol->wil.cur_weight can be 0, as in
weighted_interleave_nodes(), if it's 0, it will be assigned to default
weight for the node.

> then
> this looks like it can be simplified as above.
>
> I don't think it's harmful, but i'll have to take a quick look at what
> happens on rebind to make sure we don't have a stale weight.

Make sense.

--
Best Regards,
Huang, Ying

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ