Re: [PATCH] gfp: GFP_RECLAIM_MASK should include __GFP_NO_KSWAPD

2015-10-14 Thread Pan Xinhui
On 2015年10月14日 16:38, Michal Hocko wrote: > On Wed 14-10-15 16:17:31, Pan Xinhui wrote: > [...] >> I have a look at Mel's patchset. yes, it can help fix my kswapd issue. >> :) So I just need change my kmalloc's gfp_flag to GFP_ATOMIC &~ >> __GFP_KSWAPD_RECLAIM, then slub will not wakeup kswpad.

Re: [PATCH] gfp: GFP_RECLAIM_MASK should include __GFP_NO_KSWAPD

2015-10-14 Thread Michal Hocko
On Wed 14-10-15 16:17:31, Pan Xinhui wrote: [...] > I have a look at Mel's patchset. yes, it can help fix my kswapd issue. > :) So I just need change my kmalloc's gfp_flag to GFP_ATOMIC &~ > __GFP_KSWAPD_RECLAIM, then slub will not wakeup kswpad. As pointed out in my other email __GFP_ATOMIC

Re: [PATCH] gfp: GFP_RECLAIM_MASK should include __GFP_NO_KSWAPD

2015-10-14 Thread Pan Xinhui
hello, Michal thanks for your kind reply! On 2015年10月14日 15:41, Michal Hocko wrote: > On Wed 14-10-15 13:58:05, Pan Xinhui wrote: >> Hi, all >> I am working on some debug features' development. >> I use kmalloc in some places of *scheduler*. > > This sounds inherently dangerous. >

Re: [PATCH] gfp: GFP_RECLAIM_MASK should include __GFP_NO_KSWAPD

2015-10-14 Thread Pan Xinhui
hi, Michal thanks for your reply :) On 2015年10月14日 15:34, Michal Hocko wrote: > On Wed 14-10-15 13:36:51, Pan Xinhui wrote: >> From: Pan Xinhui >> >> GFP_RECLAIM_MASK was introduced in commit 6cb062296f73 ("Categorize GFP >> flags"). In slub subsystem, this macro controls slub's

Re: [PATCH] gfp: GFP_RECLAIM_MASK should include __GFP_NO_KSWAPD

2015-10-14 Thread Michal Hocko
On Wed 14-10-15 13:58:05, Pan Xinhui wrote: > Hi, all > I am working on some debug features' development. > I use kmalloc in some places of *scheduler*. This sounds inherently dangerous. > And the gfp_flag is GFP_ATOMIC, code looks like > p = kmalloc(sizeof(*p), GFP_ATOMIC); > > however

Re: [PATCH] gfp: GFP_RECLAIM_MASK should include __GFP_NO_KSWAPD

2015-10-14 Thread Michal Hocko
On Wed 14-10-15 13:36:51, Pan Xinhui wrote: > From: Pan Xinhui > > GFP_RECLAIM_MASK was introduced in commit 6cb062296f73 ("Categorize GFP > flags"). In slub subsystem, this macro controls slub's allocation > behavior. In particular, some flags which are not in GFP_RECLAIM_MASK > will be

Re: [PATCH] gfp: GFP_RECLAIM_MASK should include __GFP_NO_KSWAPD

2015-10-14 Thread Pan Xinhui
Hi, all I am working on some debug features' development. I use kmalloc in some places of *scheduler*. And the gfp_flag is GFP_ATOMIC, code looks like p = kmalloc(sizeof(*p), GFP_ATOMIC); however I notice GFP_ATOMIC is still not enough. because when system is at low memory state, slub

Re: [PATCH] gfp: GFP_RECLAIM_MASK should include __GFP_NO_KSWAPD

2015-10-14 Thread Pan Xinhui
Hi, all I am working on some debug features' development. I use kmalloc in some places of *scheduler*. And the gfp_flag is GFP_ATOMIC, code looks like p = kmalloc(sizeof(*p), GFP_ATOMIC); however I notice GFP_ATOMIC is still not enough. because when system is at low memory state, slub

Re: [PATCH] gfp: GFP_RECLAIM_MASK should include __GFP_NO_KSWAPD

2015-10-14 Thread Michal Hocko
On Wed 14-10-15 13:58:05, Pan Xinhui wrote: > Hi, all > I am working on some debug features' development. > I use kmalloc in some places of *scheduler*. This sounds inherently dangerous. > And the gfp_flag is GFP_ATOMIC, code looks like > p = kmalloc(sizeof(*p), GFP_ATOMIC); > > however

Re: [PATCH] gfp: GFP_RECLAIM_MASK should include __GFP_NO_KSWAPD

2015-10-14 Thread Michal Hocko
On Wed 14-10-15 16:17:31, Pan Xinhui wrote: [...] > I have a look at Mel's patchset. yes, it can help fix my kswapd issue. > :) So I just need change my kmalloc's gfp_flag to GFP_ATOMIC &~ > __GFP_KSWAPD_RECLAIM, then slub will not wakeup kswpad. As pointed out in my other email __GFP_ATOMIC

Re: [PATCH] gfp: GFP_RECLAIM_MASK should include __GFP_NO_KSWAPD

2015-10-14 Thread Pan Xinhui
hello, Michal thanks for your kind reply! On 2015年10月14日 15:41, Michal Hocko wrote: > On Wed 14-10-15 13:58:05, Pan Xinhui wrote: >> Hi, all >> I am working on some debug features' development. >> I use kmalloc in some places of *scheduler*. > > This sounds inherently dangerous. >

Re: [PATCH] gfp: GFP_RECLAIM_MASK should include __GFP_NO_KSWAPD

2015-10-14 Thread Pan Xinhui
hi, Michal thanks for your reply :) On 2015年10月14日 15:34, Michal Hocko wrote: > On Wed 14-10-15 13:36:51, Pan Xinhui wrote: >> From: Pan Xinhui >> >> GFP_RECLAIM_MASK was introduced in commit 6cb062296f73 ("Categorize GFP >> flags"). In slub subsystem, this macro

Re: [PATCH] gfp: GFP_RECLAIM_MASK should include __GFP_NO_KSWAPD

2015-10-14 Thread Michal Hocko
On Wed 14-10-15 13:36:51, Pan Xinhui wrote: > From: Pan Xinhui > > GFP_RECLAIM_MASK was introduced in commit 6cb062296f73 ("Categorize GFP > flags"). In slub subsystem, this macro controls slub's allocation > behavior. In particular, some flags which are not in

Re: [PATCH] gfp: GFP_RECLAIM_MASK should include __GFP_NO_KSWAPD

2015-10-14 Thread Pan Xinhui
On 2015年10月14日 16:38, Michal Hocko wrote: > On Wed 14-10-15 16:17:31, Pan Xinhui wrote: > [...] >> I have a look at Mel's patchset. yes, it can help fix my kswapd issue. >> :) So I just need change my kmalloc's gfp_flag to GFP_ATOMIC &~ >> __GFP_KSWAPD_RECLAIM, then slub will not wakeup kswpad.

[PATCH] gfp: GFP_RECLAIM_MASK should include __GFP_NO_KSWAPD

2015-10-13 Thread Pan Xinhui
From: Pan Xinhui GFP_RECLAIM_MASK was introduced in commit 6cb062296f73 ("Categorize GFP flags"). In slub subsystem, this macro controls slub's allocation behavior. In particular, some flags which are not in GFP_RECLAIM_MASK will be cleared. So when slub pass this new gfp_flag into page

[PATCH] gfp: GFP_RECLAIM_MASK should include __GFP_NO_KSWAPD

2015-10-13 Thread Pan Xinhui
From: Pan Xinhui GFP_RECLAIM_MASK was introduced in commit 6cb062296f73 ("Categorize GFP flags"). In slub subsystem, this macro controls slub's allocation behavior. In particular, some flags which are not in GFP_RECLAIM_MASK will be cleared. So when slub pass this new