* [PATCH] min_free_kbytes limit
@ 2005-03-23 11:34 Levent Serinol
2005-03-23 14:00 ` Martin Hicks
0 siblings, 1 reply; 5+ messages in thread
From: Levent Serinol @ 2005-03-23 11:34 UTC (permalink / raw)
To: linux-mm
=================================================================
--- linux-2.6.11.4/mm/page_alloc.c.org 2005-03-16 02:09:27.000000000 +0200
+++ linux-2.6.11.4/mm/page_alloc.c 2005-03-23 13:13:47.000000000 +0200
@@ -1946,11 +1946,16 @@ static void setup_per_zone_lowmem_reserv
*/
static void setup_per_zone_pages_min(void)
{
- unsigned long pages_min = min_free_kbytes >> (PAGE_SHIFT - 10);
+ unsigned long pages_min;
unsigned long lowmem_pages = 0;
struct zone *zone;
unsigned long flags;
+ if (min_free_kbytes < 128)
+ min_free_kbytes = 128;
+ if (min_free_kbytes > 65536)
+ min_free_kbytes = 65536;
+ pages_min = min_free_kbytes >> (PAGE_SHIFT - 10);
/* Calculate total number of !ZONE_HIGHMEM pages */
for_each_zone(zone) {
if (!is_highmem(zone))
=================================================================
--
Stay out of the road, if you want to grow old.
~ Pink Floyd ~.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] min_free_kbytes limit
2005-03-23 11:34 [PATCH] min_free_kbytes limit Levent Serinol
@ 2005-03-23 14:00 ` Martin Hicks
2005-03-23 14:17 ` Levent Serinol
0 siblings, 1 reply; 5+ messages in thread
From: Martin Hicks @ 2005-03-23 14:00 UTC (permalink / raw)
To: Levent Serinol; +Cc: linux-mm
On Wed, Mar 23, 2005 at 01:34:19PM +0200, Levent Serinol wrote:
> =================================================================
> --- linux-2.6.11.4/mm/page_alloc.c.org 2005-03-16 02:09:27.000000000 +0200
> +++ linux-2.6.11.4/mm/page_alloc.c 2005-03-23 13:13:47.000000000 +0200
> @@ -1946,11 +1946,16 @@ static void setup_per_zone_lowmem_reserv
> */
> static void setup_per_zone_pages_min(void)
> {
> - unsigned long pages_min = min_free_kbytes >> (PAGE_SHIFT - 10);
> + unsigned long pages_min;
> unsigned long lowmem_pages = 0;
> struct zone *zone;
> unsigned long flags;
>
> + if (min_free_kbytes < 128)
> + min_free_kbytes = 128;
> + if (min_free_kbytes > 65536)
> + min_free_kbytes = 65536;
> + pages_min = min_free_kbytes >> (PAGE_SHIFT - 10);
Who says 65MB of free ram is enough? Where did you get these numbers
from?
mh
> /* Calculate total number of !ZONE_HIGHMEM pages */
> for_each_zone(zone) {
> if (!is_highmem(zone))
> =================================================================
> --
>
> Stay out of the road, if you want to grow old.
> ~ Pink Floyd ~.
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org. For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
--
Martin Hicks || mort@bork.org || PGP/GnuPG: 0x4C7F2BEE
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] min_free_kbytes limit
2005-03-23 14:00 ` Martin Hicks
@ 2005-03-23 14:17 ` Levent Serinol
2005-03-23 14:23 ` Martin Hicks
0 siblings, 1 reply; 5+ messages in thread
From: Levent Serinol @ 2005-03-23 14:17 UTC (permalink / raw)
To: Martin Hicks; +Cc: linux-mm
init_per_zone_pages_min() function. The problem with min_free_kbytes
is, it's integer and accepts signed values. There should be something
to like this to avoid problems for example setting min_free_kbytes
value to below zero.
On Wed, 23 Mar 2005 09:00:49 -0500, Martin Hicks <mort@bork.org> wrote:
>
> On Wed, Mar 23, 2005 at 01:34:19PM +0200, Levent Serinol wrote:
> > =================================================================
> > --- linux-2.6.11.4/mm/page_alloc.c.org 2005-03-16 02:09:27.000000000 +0200
> > +++ linux-2.6.11.4/mm/page_alloc.c 2005-03-23 13:13:47.000000000 +0200
> > @@ -1946,11 +1946,16 @@ static void setup_per_zone_lowmem_reserv
> > */
> > static void setup_per_zone_pages_min(void)
> > {
> > - unsigned long pages_min = min_free_kbytes >> (PAGE_SHIFT - 10);
> > + unsigned long pages_min;
> > unsigned long lowmem_pages = 0;
> > struct zone *zone;
> > unsigned long flags;
> >
> > + if (min_free_kbytes < 128)
> > + min_free_kbytes = 128;
> > + if (min_free_kbytes > 65536)
> > + min_free_kbytes = 65536;
> > + pages_min = min_free_kbytes >> (PAGE_SHIFT - 10);
>
> Who says 65MB of free ram is enough? Where did you get these numbers
> from?
>
> mh
>
> > /* Calculate total number of !ZONE_HIGHMEM pages */
> > for_each_zone(zone) {
> > if (!is_highmem(zone))
> > =================================================================
> > --
> >
> > Stay out of the road, if you want to grow old.
> > ~ Pink Floyd ~.
> > --
> > To unsubscribe, send a message with 'unsubscribe linux-mm' in
> > the body to majordomo@kvack.org. For more info on Linux MM,
> > see: http://www.linux-mm.org/ .
> > Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
>
> --
> Martin Hicks || mort@bork.org || PGP/GnuPG: 0x4C7F2BEE
>
--
Stay out of the road, if you want to grow old.
~ Pink Floyd ~.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] min_free_kbytes limit
2005-03-23 14:17 ` Levent Serinol
@ 2005-03-23 14:23 ` Martin Hicks
2005-03-23 14:34 ` Levent Serinol
0 siblings, 1 reply; 5+ messages in thread
From: Martin Hicks @ 2005-03-23 14:23 UTC (permalink / raw)
To: Levent Serinol; +Cc: linux-mm
On Wed, Mar 23, 2005 at 04:17:32PM +0200, Levent Serinol wrote:
> init_per_zone_pages_min() function. The problem with min_free_kbytes
> is, it's integer and accepts signed values. There should be something
> to like this to avoid problems for example setting min_free_kbytes
> value to below zero.
>
min_free_kbytes is limited to > 0 by the sysctl handler in
kernel/sysctl.c
mh
--
Martin Hicks || mort@bork.org || PGP/GnuPG: 0x4C7F2BEE
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] min_free_kbytes limit
2005-03-23 14:23 ` Martin Hicks
@ 2005-03-23 14:34 ` Levent Serinol
0 siblings, 0 replies; 5+ messages in thread
From: Levent Serinol @ 2005-03-23 14:34 UTC (permalink / raw)
To: Martin Hicks; +Cc: linux-mm
right, I missed sysctl part :-(
On Wed, 23 Mar 2005 09:23:58 -0500, Martin Hicks <mort@bork.org> wrote:
>
> On Wed, Mar 23, 2005 at 04:17:32PM +0200, Levent Serinol wrote:
> > init_per_zone_pages_min() function. The problem with min_free_kbytes
> > is, it's integer and accepts signed values. There should be something
> > to like this to avoid problems for example setting min_free_kbytes
> > value to below zero.
> >
>
> min_free_kbytes is limited to > 0 by the sysctl handler in
> kernel/sysctl.c
>
> mh
>
> --
> Martin Hicks || mort@bork.org || PGP/GnuPG: 0x4C7F2BEE
>
--
Stay out of the road, if you want to grow old.
~ Pink Floyd ~.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-03-23 14:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-23 11:34 [PATCH] min_free_kbytes limit Levent Serinol
2005-03-23 14:00 ` Martin Hicks
2005-03-23 14:17 ` Levent Serinol
2005-03-23 14:23 ` Martin Hicks
2005-03-23 14:34 ` Levent Serinol
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox