Re: Sharing page tables for shared memory

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Tue, 15 Dec 1998 11:20:10 +0000


On Tue, Dec 15, 1998 at 09:31:29AM +0530, Muthu wrote:
> In case of oracle, the shared memory will be around 120MB or more and
> each
> client connected will share this memory.
>
> Assume, the case of 50 clients connected, then
> 4Mb saves 4K
> 120Mb saves 120Kb per processe
>
> If there are 50 clients then 120Kb x 50 =6000kb (huge number).

Your example is very unusual, with so many clients using the same shared
memory. Let's see if I have this right.

You have 50 independent processes, and a 120MB shared memory region?
Buy some more RAM then! :-)

Suggestion: Can you use clone()ed threads? These are like
processes, but share their _entire_ address space. The page tables
are all shared, and context switches are faster because the MM
context stays the same between threads.

> The important thing, to be noted is as the number of clients
> increases, the performance will decrease. I think, it is worth to
> implement this.

Your application is the only example I've seen where this might be true.
x86 4M pages make sense too, but they require special setup and to
not be touched by the page scanner.

Assuming you have enough RAM, you could reserve the 120MB memory in
advance, and map it through a specially written device using 4M pages.
That might be a good idea for your application.

-- Jamie

-
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/