>-----Original Message----- >From: owner-linux-mm@xxxxxxxxx [mailto:owner-linux-mm@xxxxxxxxx] On >Behalf Of Michal Hocko >Sent: Thursday, April 25, 2019 3:49 PM >To: Du, Fan <fan.du@xxxxxxxxx> >Cc: akpm@xxxxxxxxxxxxxxxxxxxx; Wu, Fengguang <fengguang.wu@xxxxxxxxx>; >Williams, Dan J <dan.j.williams@xxxxxxxxx>; Hansen, Dave ><dave.hansen@xxxxxxxxx>; xishi.qiuxishi@xxxxxxxxxxxxxxx; Huang, Ying ><ying.huang@xxxxxxxxx>; linux-mm@xxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx >Subject: Re: [RFC PATCH 5/5] mm, page_alloc: Introduce >ZONELIST_FALLBACK_SAME_TYPE fallback list > >On Thu 25-04-19 07:43:09, Du, Fan wrote: >> >> >> >-----Original Message----- >> >From: Michal Hocko [mailto:mhocko@xxxxxxxxxx] >> >Sent: Thursday, April 25, 2019 2:38 PM >> >To: Du, Fan <fan.du@xxxxxxxxx> >> >Cc: akpm@xxxxxxxxxxxxxxxxxxxx; Wu, Fengguang ><fengguang.wu@xxxxxxxxx>; >> >Williams, Dan J <dan.j.williams@xxxxxxxxx>; Hansen, Dave >> ><dave.hansen@xxxxxxxxx>; xishi.qiuxishi@xxxxxxxxxxxxxxx; Huang, Ying >> ><ying.huang@xxxxxxxxx>; linux-mm@xxxxxxxxx; >linux-kernel@xxxxxxxxxxxxxxx >> >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. Case 1: frequently write and/or read accessed page deserved to DRAM Case 2: frequently read accessed page deserved to PMEM We need something like a new gfp flag to sort above two cases out >From each other. >-- >Michal Hocko >SUSE Labs