[lkml]   [2003]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectout_of_memory called to often

We are running an embedded linux (2.4.19) with no swap
sapce. And we haven't applied any rmap yet.

Currely when the system runs low (reached the
pages_low water-mark), kswapd kicks in. But soon after
kswapd kicks in, the out_of_memory is called due to
swapd not being able to reclaim enough pages from the
page cache from each run of it. I don't understand why
sometimes swapd can't reclaim the SWAP_CLUSTER_MAX
number of pages.

We know there are still some number of cache pages
that can be reclaimed if we run the following c

int main() {
int i, j;
char *tmp[10000]

for (i=0; i<NUMBER_OF_PAGES_LEFT_BEFORE_pages_low;
i++) tmp[i]=malloc(4k);
for (i=0; i<NUMBER_OF_PAGES_LEFT_BEFORE_pages_low;
i++) free(tmp[i]);
To solve this problem, I am trying to make a
conditional call to the out_of_memory() -- only if the
pages_min is reached, then the out_of_memory() can be

If we can solve the swapd livelock problem, is this a
feasible solution? If you have a better idea, can you
please share with us?

Any input will be greatly appreciated.

Thanks very much in advance! Please include my email
address in your reply.


Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:33    [W:0.030 / U:2.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site