lkml.org 
[lkml]   [2007]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] [bugfix] loop.c
On Fri, 23 Mar 2007, Tomas M wrote:

> This is a bugfix for loop.c block driver, as it currently allocates more
> memory then it needs, without any further use.
> If 'max_loop=255' parameter is given, the loop.c driver allocates this
> amount of memory:
> kmalloc(max_loop * sizeof(struct loop_device))
> But in this case, (max_loop * sizeof) is greater than 65536, and thus kmalloc
> must allocate the next bigger size (which is 128KB of RAM).

Which is very unlikely to work after some time of uptime, as the memory
will be too fragmented to successfully kmalloc(128k). I guess that the
code should be rather rewritten not to allocate such large contignuous
chunks of memory through kmalloc().

--
Jiri Kosina
-
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: 2007-03-23 17:49    [W:0.152 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site