lkml.org 
[lkml]   [1998]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kswapd's priority
On Fri, 26 Jun 1998, MOLNAR Ingo wrote:
> On Fri, 26 Jun 1998, Rik van Riel wrote:
>
> > There's only one problem with that: tasks don't wait for
> > memory. If the memory's there they grab it, otherwise they
> > try to free some theirselves; and if that fails, they die.
>
> take a look at rw_swap_page(). If served with wait==1, it does wait for
> swapout to finish. When a process is sleeping there, it _is_ waiting for
> kswapd too (kswapd is probably busy trying to free some pages as well).

Uhmm, no. If a process is sleeping there, it's probably because
it's doing the I/O in it's _own_ context.
The only case where a process is actually waiting on kswapd is
when a process is doing a page-in on a page while kswapd tries
to swap out the _same_ page, which is something that shouldn't
happen very often.
(OK, it does happen, but with a good aging algorithm it should
not happen very often)

> But yes, the information on what the relationship between kernel thread's
> action and processes is is not direct, and in some cases even impossible
> to get.

If a process tries to allocate memory, and there is none, then
it tries to free memory all by itself. Look in __get_free_pages()
for more info.

(I know the code is there; I put it there in the first place :)

Rik.
+-------------------------------------------------------------------+
| Linux memory management tour guide. H.H.vanRiel@phys.uu.nl |
| Scouting Vries cubscout leader. http://www.phys.uu.nl/~riel/ |
+-------------------------------------------------------------------+


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

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