Re: shm swapping in 2.4 again

2000-11-16 Thread Christoph Rohland
Hi Rik, On Thu, 16 Nov 2000, Rik van Riel wrote: > On 16 Nov 2000, Christoph Rohland wrote: >> Also we have to make sure to derefence the swap entry if the >> last reference is in the shm segmant table . > > Why is this? Because you never get a page fault on the shm segmants. So you never will

Re: shm swapping in 2.4 again

2000-11-16 Thread Rik van Riel
On 16 Nov 2000, Christoph Rohland wrote: > Oh, I missed one point: we need to handle the swapout of > nonattached pages: in shm you can detach the last user and the > segment with content is still around. So we have to scan the shm > objects themselves also. Should We could do this in the same >

Re: shm swapping in 2.4 again

2000-11-16 Thread Christoph Rohland
Oh, I missed one point: we need to handle the swapout of nonattached pages: in shm you can detach the last user and the segment with content is still around. So we have to scan the shm objects themselves also. Should We could do this in the same loop as we scan the mm's? Also we have to make sure

Re: shm swapping in 2.4 again

2000-11-16 Thread Christoph Rohland
Hi Rik, On Thu, 16 Nov 2000, Rik van Riel wrote: > On 16 Nov 2000, Christoph Rohland wrote: >> So in shm_swap_out I check if the page is already in the swap >> cache. If not I put the page into it and note the swap entry in >> the shadow pte of shm. Right? > > Exactly. And I'll change page_laund

Re: shm swapping in 2.4 again

2000-11-16 Thread Rik van Riel
On 16 Nov 2000, Christoph Rohland wrote: > On Wed, 15 Nov 2000, Rik van Riel wrote: > > On 15 Nov 2000, Christoph Rohland wrote: > > You really want to have it in the swap cache, so we have > > a place for it allocated in cache, etc... > > > > Basically, when we unmap it in try_to_swap_out(), we

Re: shm swapping in 2.4 again

2000-11-16 Thread Christoph Rohland
Hi Rik, On Wed, 15 Nov 2000, Rik van Riel wrote: > On 15 Nov 2000, Christoph Rohland wrote: > You really want to have it in the swap cache, so we have > a place for it allocated in cache, etc... > > Basically, when we unmap it in try_to_swap_out(), we > should add the page to the swap cache, and

Re: shm swapping in 2.4 again

2000-11-15 Thread Rik van Riel
On 15 Nov 2000, Christoph Rohland wrote: > On Wed, 15 Nov 2000, Rik van Riel wrote: > > On 15 Nov 2000, Christoph Rohland wrote: > >> 2) Integrating it into the global lru lists and/or the page cache. > >> > >> I think the second approach is the way to go but I do not > >> understand the global

Re: shm swapping in 2.4 again

2000-11-15 Thread Christoph Rohland
Hi Rik, On Wed, 15 Nov 2000, Rik van Riel wrote: > On 15 Nov 2000, Christoph Rohland wrote: > >> - shm_swap is called from swap_out. Actually on my machine after a >>while it only gets called without __GFP_IO set, which means it >>will not do anything which again leads to deadlock. > >

Re: shm swapping in 2.4 again

2000-11-15 Thread Rik van Riel
On 15 Nov 2000, Christoph Rohland wrote: > - shm_swap is called from swap_out. Actually on my machine after a >while it only gets called without __GFP_IO set, which means it will >not do anything which again leads to deadlock. Only _without_ __GFP_IO ? That's not quite right since that

shm swapping in 2.4 again

2000-11-15 Thread Christoph Rohland
Hi Rik et al, here I am again. I investigated more into the shm swapping in 2.4 and discovered the following things: - shm_swap is called from swap_out. Actually on my machine after a while it only gets called without __GFP_IO set, which means it will not do anything which again leads to

Re: shm swapping in 2.4 again

2000-11-15 Thread Christoph Rohland
Forgot to append the patch... Greetings Christoph diff -uNr 4-11-3/ipc/shm.c c/ipc/shm.c --- 4-11-3/ipc/shm.cWed Oct 4 15:58:02 2000 +++ c/ipc/shm.c Tue Nov 14 17:43:01 2000 @@ -80,6 +80,7 @@ unsigned long shm_npages; /* size of segment (pages) */ p