[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4603DE86.1090009@slax.org>
Date: Fri, 23 Mar 2007 15:04:54 +0100
From: Tomas M <tomas@...x.org>
To: linux-kernel@...r.kernel.org
Subject: [patch] [bugfix] loop.c
I posted this yesterday but it seems people didn't understand the real
goal of my patch. So I will explain once more again:
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).
Unfortunately the loop.c driver doesn't allow users to use bigger
max_loop then 255 (for reasons which are completely obsolete) so the
rest of memory is *unused*.
This patch doesn't fix unused memory in the case of max_loop=255, but
rather it allows user to specify bigger max_loop (up to 455 on 386), so
the user can fully use all the memory, which would be allocated anyway.
Thank you for your consideration
Tomas M
slax.org
View attachment "loop.c.diff" of type "text/x-patch" (1049 bytes)
Powered by blists - more mailing lists