Re: [PATCH] staging: lustre: fix GFP_ATOMIC macro usage

2014-01-21 Thread Drokin, Oleg
Hello! On Jan 21, 2014, at 4:15 PM, Dave Hansen wrote: > On 01/21/2014 12:02 PM, Dilger, Andreas wrote: >> The Lustre allocation macros track the memory usage across the whole >> filesystem, >> not just of a single structure that a mempool/slab/whatever would do. >> This is >> useful to know for

Re: [PATCH] staging: lustre: fix GFP_ATOMIC macro usage

2014-01-21 Thread Drokin, Oleg
Hello! On Jan 21, 2014, at 3:16 PM, Dan Carpenter wrote: > We have a leak checker in the kernel but most people disable it. I > forget the config name. There are a bunch of useful debug configs. I actually use it at times too and it's useful (e.g. it works even if you did not wrap the allocat

Re: [PATCH] staging: lustre: fix GFP_ATOMIC macro usage

2014-01-21 Thread Dave Hansen
On 01/21/2014 12:02 PM, Dilger, Andreas wrote: > The Lustre allocation macros track the memory usage across the whole > filesystem, > not just of a single structure that a mempool/slab/whatever would do. > This is > useful to know for debugging purposes (e.g. user complains about not having > enoug

Re: [PATCH] staging: lustre: fix GFP_ATOMIC macro usage

2014-01-21 Thread Dan Carpenter
Greg meant mempools not slab. You should look at it. It does what you need for debugging and solves a couple other problems as well. We have a leak checker in the kernel but most people disable it. I forget the config name. There are a bunch of useful debug configs. regards, dan carpenter ___

Re: [PATCH] staging: lustre: fix GFP_ATOMIC macro usage

2014-01-21 Thread Dilger, Andreas
On 2014/01/17, 8:17 AM, "Greg Kroah-Hartman" wrote: >On Fri, Jan 17, 2014 at 05:51:28PM +0300, Dan Carpenter wrote: >> We will want to get rid of lustre's custom allocator before this gets >> out of staging. >> >> But one feature that the lustre allocator has which is pretty neat is >> that it l

Re: [PATCH] staging: lustre: fix GFP_ATOMIC macro usage

2014-01-20 Thread Marek Szyprowski
Hello, On 2014-01-17 15:33, Greg Kroah-Hartman wrote: On Fri, Jan 17, 2014 at 09:46:56AM +0100, Marek Szyprowski wrote: > GFP_ATOMIC is not a single gfp flag, but a macro which expands to the other > flags and LACK of __GFP_WAIT flag. To check if caller wanted to perform an > atomic allocation,

Re: [PATCH] staging: lustre: fix GFP_ATOMIC macro usage

2014-01-17 Thread Greg Kroah-Hartman
On Fri, Jan 17, 2014 at 05:51:28PM +0300, Dan Carpenter wrote: > We will want to get rid of lustre's custom allocator before this gets > out of staging. > > But one feature that the lustre allocator has which is pretty neat is > that it lets you debug how much memory the filesystem is using. Is >

Re: [PATCH] staging: lustre: fix GFP_ATOMIC macro usage

2014-01-17 Thread Dan Carpenter
We will want to get rid of lustre's custom allocator before this gets out of staging. But one feature that the lustre allocator has which is pretty neat is that it lets you debug how much memory the filesystem is using. Is there a standard way to find this information? regards, dan carpenter __

Re: [PATCH] staging: lustre: fix GFP_ATOMIC macro usage

2014-01-17 Thread Greg Kroah-Hartman
On Fri, Jan 17, 2014 at 09:46:56AM +0100, Marek Szyprowski wrote: > GFP_ATOMIC is not a single gfp flag, but a macro which expands to the other > flags and LACK of __GFP_WAIT flag. To check if caller wanted to perform an > atomic allocation, the code must test __GFP_WAIT flag presence. > > Signed-