On Thu 25-04-19 07:43:09, Du, Fan wrote: > > > >-----Original Message----- > >From: Michal Hocko [mailto:mho...@kernel.org] > >Sent: Thursday, April 25, 2019 2:38 PM > >To: Du, Fan <fan...@intel.com> > >Cc: a...@linux-foundation.org; Wu, Fengguang <fengguang...@intel.com>; > >Williams, Dan J <dan.j.willi...@intel.com>; Hansen, Dave > ><dave.han...@intel.com>; xishi.qiuxi...@alibaba-inc.com; Huang, Ying > ><ying.hu...@intel.com>; linux...@kvack.org; linux-kernel@vger.kernel.org > >Subject: Re: [RFC PATCH 5/5] mm, page_alloc: Introduce > >ZONELIST_FALLBACK_SAME_TYPE fallback list > > > >On Thu 25-04-19 09:21:35, Fan Du wrote: > >> On system with heterogeneous memory, reasonable fall back lists woul be: > >> a. No fall back, stick to current running node. > >> b. Fall back to other nodes of the same type or different type > >> e.g. DRAM node 0 -> DRAM node 1 -> PMEM node 2 -> PMEM node 3 > >> c. Fall back to other nodes of the same type only. > >> e.g. DRAM node 0 -> DRAM node 1 > >> > >> a. is already in place, previous patch implement b. providing way to > >> satisfy memory request as best effort by default. And this patch of > >> writing build c. to fallback to the same node type when user specify > >> GFP_SAME_NODE_TYPE only. > > > >So an immediate question which should be answered by this changelog. Who > >is going to use the new gfp flag? Why cannot all allocations without an > >explicit numa policy fallback to all existing nodes? > > PMEM is good for frequently read accessed page, e.g. page cache(implicit page > request), or user space data base (explicit page request) > For now this patch create GFP_SAME_NODE_TYPE for such cases, additional > Implementation will be followed up.
Then simply configure that NUMA node as movable and you get these allocations for any movable allocation. I am not really convinced a new gfp flag is really justified. -- Michal Hocko SUSE Labs