lkml.org 
[lkml]   [2005]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateWed, 3 Aug 2005 14:36:44 +0800
FromDavid Teigland <>
SubjectRe: [PATCH 00/14] GFS
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-08-03 08:35    [from the cache]
©2003-2010