Re: [PATCH 02/10] mm/numa: automatically generate node migration order

2021-04-15 Thread Wei Xu
On Thu, Apr 15, 2021 at 8:35 AM Dave Hansen wrote: > > This can help enable more flexible demotion policies to be > > configured, such as to allow a cgroup to allocate from all fast tier > > nodes, but only demote to a local slow tier node. Such a policy can > > reduce memory stranding at the

Re: [PATCH 02/10] mm/numa: automatically generate node migration order

2021-04-15 Thread Dave Hansen
On 4/14/21 9:07 PM, Wei Xu wrote: > On Wed, Apr 14, 2021 at 1:08 AM Oscar Salvador wrote: >> Fast class/memory are pictured as those nodes with CPUs, while Slow >> class/memory >> are PMEM, right? >> Then, what stands for medium class/memory? > > That is Dave's example. I think David's guess

Re: [PATCH 02/10] mm/numa: automatically generate node migration order

2021-04-14 Thread Wei Xu
On Wed, Apr 14, 2021 at 1:08 AM Oscar Salvador wrote: > > Hi Wei Xu, > > I have some questions about it > > Fast class/memory are pictured as those nodes with CPUs, while Slow > class/memory > are PMEM, right? > Then, what stands for medium class/memory? That is Dave's example. I think David's

Re: [PATCH 02/10] mm/numa: automatically generate node migration order

2021-04-14 Thread David Hildenbrand
On 14.04.21 10:14, Oscar Salvador wrote: On Wed, Apr 14, 2021 at 10:12:29AM +0200, David Hildenbrand wrote: My guest best is that fast class is something like HBM (High Bandwidth haha, whatever happened in that sentence: s/guest best/best guess/ Memory), medium class is ordinary RAM, slow

Re: [PATCH 02/10] mm/numa: automatically generate node migration order

2021-04-14 Thread Oscar Salvador
On Wed, Apr 14, 2021 at 10:12:29AM +0200, David Hildenbrand wrote: > My guest best is that fast class is something like HBM (High Bandwidth > Memory), medium class is ordinary RAM, slow class is PMEM. I see, thanks for the hint David ;-) -- Oscar Salvador SUSE L3

Re: [PATCH 02/10] mm/numa: automatically generate node migration order

2021-04-14 Thread David Hildenbrand
On 14.04.21 10:08, Oscar Salvador wrote: On Fri, Apr 09, 2021 at 08:07:08PM -0700, Wei Xu wrote: On Thu, Apr 1, 2021 at 11:35 AM Dave Hansen wrote: + * When Node 0 fills up, its memory should be migrated to + * Node 1. When Node 1 fills up, it should be migrated to + * Node 2. The migration

Re: [PATCH 02/10] mm/numa: automatically generate node migration order

2021-04-14 Thread Oscar Salvador
On Wed, Apr 14, 2021 at 10:08:54AM +0200, Oscar Salvador wrote: > In Dave's example, list is created in a way that stays local to the socket, > and we go from the fast one to the slow one. Or maybe it is just because find_next_best_node() does not know any better and creates the list that way?

Re: [PATCH 02/10] mm/numa: automatically generate node migration order

2021-04-14 Thread Oscar Salvador
On Fri, Apr 09, 2021 at 08:07:08PM -0700, Wei Xu wrote: > On Thu, Apr 1, 2021 at 11:35 AM Dave Hansen > wrote: > > + * When Node 0 fills up, its memory should be migrated to > > + * Node 1. When Node 1 fills up, it should be migrated to > > + * Node 2. The migration path start on the nodes

Re: [PATCH 02/10] mm/numa: automatically generate node migration order

2021-04-09 Thread Wei Xu
On Thu, Apr 1, 2021 at 11:35 AM Dave Hansen wrote: > +/* > + * node_demotion[] example: > + * > + * Consider a system with two sockets. Each socket has > + * three classes of memory attached: fast, medium and slow. > + * Each memory class is placed in its own NUMA node. The > + * CPUs are

Re: [PATCH 02/10] mm/numa: automatically generate node migration order

2021-04-09 Thread Oscar Salvador
On Thu, Apr 08, 2021 at 02:51:20PM -0700, Dave Hansen wrote: > I've fleshed out the description a bit. I hope this helps? Yes, thanks Dave, both additions look fine to me. -- Oscar Salvador SUSE L3

Re: [PATCH 02/10] mm/numa: automatically generate node migration order

2021-04-08 Thread Dave Hansen
On 4/8/21 1:26 AM, Oscar Salvador wrote: > On Thu, Apr 01, 2021 at 11:32:19AM -0700, Dave Hansen wrote: >> The protocol for node_demotion[] access and writing is not >> standard. It has no specific locking and is intended to be read >> locklessly. Readers must take care to avoid observing

Re: [PATCH 02/10] mm/numa: automatically generate node migration order

2021-04-08 Thread Oscar Salvador
On Thu, Apr 01, 2021 at 11:32:19AM -0700, Dave Hansen wrote: > > From: Dave Hansen > > When memory fills up on a node, memory contents can be > automatically migrated to another node. The biggest problems are > knowing when to migrate and to where the migration should be > targeted. > > The

[PATCH 02/10] mm/numa: automatically generate node migration order

2021-04-01 Thread Dave Hansen
From: Dave Hansen When memory fills up on a node, memory contents can be automatically migrated to another node. The biggest problems are knowing when to migrate and to where the migration should be targeted. The most straightforward way to generate the "to where" list would be to follow the

Re: [PATCH 02/10] mm/numa: automatically generate node migration order

2021-03-08 Thread Yang Shi
On Thu, Mar 4, 2021 at 4:00 PM Dave Hansen wrote: > > > From: Dave Hansen > > When memory fills up on a node, memory contents can be > automatically migrated to another node. The biggest problems are > knowing when to migrate and to where the migration should be > targeted. > > The most

[PATCH 02/10] mm/numa: automatically generate node migration order

2021-03-04 Thread Dave Hansen
From: Dave Hansen When memory fills up on a node, memory contents can be automatically migrated to another node. The biggest problems are knowing when to migrate and to where the migration should be targeted. The most straightforward way to generate the "to where" list would be to follow the