Re: Adaptive thread creation by the kernel

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Sun Feb 06 2000 - 14:05:30 EST


> > if (mincore(map, readlength, vec))
> > perror("mincore");
> >
> > the vec[] contains a byte for each page you queried. each byte has value
> > "1" if the page is already in memory, otherwise "0".
>
> You do a syscall every time you're going to read part of a file?
> How do you ensure it's still there by the time you actually read it?

It might not be,

> How do you force the page in when it's not in memory -- spawn
> another thread?

Bingo. Thats how the hacked thttpd uses mincore - a way to ask the kernel if
it should go making threads for this request

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Feb 07 2000 - 21:00:13 EST