Re: [PATCH] memcg: make it work on sparse non-0-node systems

2019-05-17 Thread Jiri Slaby
On 17. 05. 19, 10:00, Vladimir Davydov wrote: > On Fri, May 17, 2019 at 06:48:37AM +0200, Jiri Slaby wrote: >> On 16. 05. 19, 15:59, Michal Hocko wrote: However, I tend to agree with Michal that (ab)using node[0].memcg_lrus to check if a list_lru is memcg aware looks confusing. I guess

Re: [PATCH] memcg: make it work on sparse non-0-node systems

2019-05-17 Thread Vladimir Davydov
On Fri, May 17, 2019 at 06:48:37AM +0200, Jiri Slaby wrote: > On 16. 05. 19, 15:59, Michal Hocko wrote: > >> However, I tend to agree with Michal that (ab)using node[0].memcg_lrus > >> to check if a list_lru is memcg aware looks confusing. I guess we could > >> simply add a bool flag to list_lru

Re: [PATCH] memcg: make it work on sparse non-0-node systems

2019-05-16 Thread Jiri Slaby
On 16. 05. 19, 15:59, Michal Hocko wrote: >> However, I tend to agree with Michal that (ab)using node[0].memcg_lrus >> to check if a list_lru is memcg aware looks confusing. I guess we could >> simply add a bool flag to list_lru instead. Something like this, may be: > > Yes, this makes much more

Re: [PATCH] memcg: make it work on sparse non-0-node systems

2019-05-16 Thread Michal Hocko
On Thu 09-05-19 15:25:26, Vladimir Davydov wrote: > On Mon, Apr 29, 2019 at 12:59:39PM +0200, Jiri Slaby wrote: > > We have a single node system with node 0 disabled: > > Scanning NUMA topology in Northbridge 24 > > Number of physical nodes 2 > > Skipping disabled node 0 > > Node 1 MemBase

Re: [PATCH] memcg: make it work on sparse non-0-node systems

2019-05-09 Thread Shakeel Butt
On Thu, May 9, 2019 at 5:25 AM Vladimir Davydov wrote: > > On Mon, Apr 29, 2019 at 12:59:39PM +0200, Jiri Slaby wrote: > > We have a single node system with node 0 disabled: > > Scanning NUMA topology in Northbridge 24 > > Number of physical nodes 2 > > Skipping disabled node 0 > > Node 1

Re: [PATCH] memcg: make it work on sparse non-0-node systems

2019-05-09 Thread Vladimir Davydov
On Mon, Apr 29, 2019 at 12:59:39PM +0200, Jiri Slaby wrote: > We have a single node system with node 0 disabled: > Scanning NUMA topology in Northbridge 24 > Number of physical nodes 2 > Skipping disabled node 0 > Node 1 MemBase Limit fbff > NODE_DATA(1)

Re: [PATCH] memcg: make it work on sparse non-0-node systems

2019-05-09 Thread Jiri Slaby
Vladimir, as you are perhaps the one most familiar with the code, could you take a look on this? On 29. 04. 19, 12:59, Jiri Slaby wrote: > We have a single node system with node 0 disabled: > Scanning NUMA topology in Northbridge 24 > Number of physical nodes 2 > Skipping disabled node 0 >

Re: [PATCH] memcg: make it work on sparse non-0-node systems

2019-04-29 Thread Michal Hocko
On Mon 29-04-19 13:55:26, Jiri Slaby wrote: > On 29. 04. 19, 13:30, Michal Hocko wrote: > > On Mon 29-04-19 12:59:39, Jiri Slaby wrote: > > [...] > >> static inline bool list_lru_memcg_aware(struct list_lru *lru) > >> { > >> - /* > >> - * This needs node 0 to be always present, even > >> -

Re: [PATCH] memcg: make it work on sparse non-0-node systems

2019-04-29 Thread Jiri Slaby
On 29. 04. 19, 13:55, Jiri Slaby wrote: > Well, I could have used first_node. But I am not sure, if the first > POSSIBLE node is also ONLINE during boot? Thinking about it, it does not matter, actually. Both first_node and first_online are allocated and set up, no matter which one is ONLINE node.

Re: [PATCH] memcg: make it work on sparse non-0-node systems

2019-04-29 Thread Jiri Slaby
On 29. 04. 19, 13:30, Michal Hocko wrote: > On Mon 29-04-19 12:59:39, Jiri Slaby wrote: > [...] >> static inline bool list_lru_memcg_aware(struct list_lru *lru) >> { >> -/* >> - * This needs node 0 to be always present, even >> - * in the systems supporting sparse numa ids. >> -

Re: [PATCH] memcg: make it work on sparse non-0-node systems

2019-04-29 Thread Michal Hocko
On Mon 29-04-19 12:59:39, Jiri Slaby wrote: [...] > static inline bool list_lru_memcg_aware(struct list_lru *lru) > { > - /* > - * This needs node 0 to be always present, even > - * in the systems supporting sparse numa ids. > - */ > - return !!lru->node[0].memcg_lrus; > +

[PATCH] memcg: make it work on sparse non-0-node systems

2019-04-29 Thread Jiri Slaby
We have a single node system with node 0 disabled: Scanning NUMA topology in Northbridge 24 Number of physical nodes 2 Skipping disabled node 0 Node 1 MemBase Limit fbff NODE_DATA(1) allocated [mem 0xfbfda000-0xfbfe] This causes crashes in memcg when