All of lore.kernel.org
 help / color / mirror / Atom feed
* out_of_memory called to often
@ 2003-03-11 19:13 Jason Li
  2003-03-11 20:43 ` Ross Biro
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Li @ 2003-03-11 19:13 UTC (permalink / raw)
  To: linux-kernel

Hi,

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
program:

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
called.

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.

-Jason



__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-03-11 20:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-11 19:13 out_of_memory called to often Jason Li
2003-03-11 20:43 ` Ross Biro

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.