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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <875xyae2lq.fsf@yhuang6-desk2.ccr.corp.intel.com>
Date: Tue, 27 Feb 2024 16:24:49 +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>,  <hannes@...xchg.org>,
  <dan.j.williams@...el.com>,  <dave.jiang@...el.com>
Subject: Re: [RFC 1/1] mm/mempolicy: introduce system default interleave
 weights

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

> On Tue, Feb 27, 2024 at 01:59:26PM +0800, Huang, Ying wrote:
>> Gregory Price <gregory.price@...verge.com> writes:
>> 
>> > I have to press this issue: Is this an actual, practical, concern?
>> 
>> I don't know who have large machine like that.  But I guess that it's
>> possible in the long run.
>>
>
> Certainly possible, although that seems like a hyper-specialized case of
> a supercomputer.  I suppose still worth considering for a bit.
>
>> > I suppose another strategy is to calculate the interleave weights
>> > un-bounded from the raw bandwidth - but continuously force reductions
>> > (through some yet-undefined algorithm) until at least one node reaches a
>> > weight of `1`.  This suffers from the opposite problem: what if the top
>> > node has a value greater than 255? Do we just cap it at 255? That seems
>> > the opposite form of problematic.
>> >
>> > (Large numbers are quite pointless, as it is essentially the antithesis
>> > of interleave)
>> 
>> Yes.  So I suggest to use a relative small number as the default weight
>> to start with for normal DRAM.  We will have to floor/ceiling the weight
>> value.
>
> Yeah more concretely, I was thinking something like
>
> unsigned int *temp_weights; /* sizeof nr_node_ids */
>
> memcpy(temp_weights, node_bandwidth);
> while min(temp_weights) > 1:
>     - attempt GCD reduction
>     - if failed (GCD=1), adjust all odd numbers to be even (+1), try again
>
> for weight in temp_weights:
>     iw_table[N] = (weight > 255) ? 255 : (unsigned char)weight;
>
> Something like this.  Of course this breaks if you have two nodes with a
> massively different bandwidth ratio (> 255:1), but that seems
> unrealistic given the intent of the devices.

Better to evaluate the maximum error introduced.  For example, for 3:2
bandwidth, the result could be 2:1.  That appears not necessary.

--
Best Regards,
Huang, Ying

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ