Re: [PATCH 00/14] GFS

From: David Teigland
Date: Wed Aug 03 2005 - 01:33:40 EST


On Tue, Aug 02, 2005 at 01:16:53PM +0300, Pekka Enberg wrote:

> > +void *gmalloc_nofail_real(unsigned int size, int flags, char *file,
> > + unsigned int line)
> > +{
> > + void *x;
> > + for (;;) {
> > + x = kmalloc(size, flags);
> > + if (x)
> > + return x;
> > + if (time_after_eq(jiffies, gfs2_malloc_warning + 5 * HZ)) {
> > + printk("GFS2: out of memory: %s, %u\n",
> > + __FILE__, __LINE__);
> > + gfs2_malloc_warning = jiffies;
> > + }
> > + yield();
>
> This does not belong in a filesystem. It also seems like a very bad
> idea. What are you trying to do here? If you absolutely must not fail,
> use __GFP_NOFAIL instead.

will do, carried over from before NOFAIL existed

> -mm has memory leak detection patches and there are others floating
> around. Please do not introduce yet another subsystem-specific debug
> allocator.

ok, thanks
Dave

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/