Re: [PATCH] mm->rss is modified without page_table_lock held

2000-12-09 Thread Albert D. Cahalan
> 32-bit Sparc has unsigned long as 32-bit, and the top 8 bits of the > atomic_t are used for a spinlock, thus a 27-bit atomic_t, there > is not enough precision. So the SPARC port is broken. It is just sick to have this "feature" screw things up for all the ports with a proper atomic_t. - To un

Re: [PATCH] mm->rss is modified without page_table_lock held

2000-12-09 Thread Roberto Fichera
At 07.00 09/12/00 -0800, David S. Miller wrote: >Date: Sat, 09 Dec 2000 16:07:03 +0100 >From: Roberto Fichera <[EMAIL PROTECTED]> > >8 bits for a spinlock ? What kind of use we have here ? > >Sparc32 (like some other older architectures) do not have a >word atomic update instruction,

Re: [PATCH] mm->rss is modified without page_table_lock held

2000-12-09 Thread David S. Miller
Date: Sat, 09 Dec 2000 16:07:03 +0100 From: Roberto Fichera <[EMAIL PROTECTED]> 8 bits for a spinlock ? What kind of use we have here ? Sparc32 (like some other older architectures) do not have a word atomic update instruction, but it does have a byte spinlock. To conserve space and imp

Re: [PATCH] mm->rss is modified without page_table_lock held

2000-12-09 Thread Roberto Fichera
At 06.42 09/12/00 -0800, David S. Miller wrote: >Date: Sat, 09 Dec 2000 15:48:05 +0100 >From: Roberto Fichera <[EMAIL PROTECTED]> > >>atomic_t does not guarentee a large enough range necessary for mm->rss > >If we haven't some atomic_t that can be negative we could define atomic_t

Re: [PATCH] mm->rss is modified without page_table_lock held

2000-12-09 Thread David S. Miller
Date: Sat, 09 Dec 2000 15:48:05 +0100 From: Roberto Fichera <[EMAIL PROTECTED]> >atomic_t does not guarentee a large enough range necessary for mm->rss If we haven't some atomic_t that can be negative we could define atomic_t as unsigned long for all arch, this is sufficient t

Re: [PATCH] mm->rss is modified without page_table_lock held

2000-12-09 Thread Roberto Fichera
At 13.43 09/12/00 +0100, Rasmus Andersen wrote: >On Sat, Dec 09, 2000 at 11:25:09AM +0100, Roberto Fichera wrote: >[...] > > >+ spin_lock(&mm->page_table_lock); > > > mm->rss++; > > >+ spin_unlock(&mm->page_table_lock); > > > > > > > [...snip...] > > > > Why we couldn't use at

Re: [PATCH] mm->rss is modified without page_table_lock held

2000-12-09 Thread David S. Miller
Date:Sat, 09 Dec 2000 11:25:09 +0100 From: Roberto Fichera <[EMAIL PROTECTED]> Why we couldn't use atomic_inc(&mm->rss) here and below, avoiding to wrap the inc with a spin_lock()/spin_unlock() ? atomic_t does not guarentee a large enough range necessary for mm->rss Later, D

Re: [PATCH] mm->rss is modified without page_table_lock held

2000-12-09 Thread Rasmus Andersen
On Sat, Dec 09, 2000 at 11:25:09AM +0100, Roberto Fichera wrote: [...] > >+ spin_lock(&mm->page_table_lock); > > mm->rss++; > >+ spin_unlock(&mm->page_table_lock); > > > > [...snip...] > > Why we couldn't use atomic_inc(&mm->rss) here and below, avoiding to wrap > the inc wit

Re: [PATCH] mm->rss is modified without page_table_lock held

2000-12-09 Thread Roberto Fichera
At 21.29 08/12/00 +0100, Rasmus Andersen wrote: >Hi. > >The following patch moves the page_table_lock in mm/* to cover the >modification of mm->rss in 240-test12-pre7. It was inspired by a >similar patch from davej(?) which covered too much, AFAIR. The item >is on Tytso's ToDo list. [...snip...]

Re: [PATCH] mm->rss is modified without page_table_lock held

2000-12-08 Thread David S. Miller
Date:Fri, 8 Dec 2000 15:36:35 -0500 (EST) From: Mark Hahn <[EMAIL PROTECTED]> can't we just change rss to count pages? This is what it does now. or are we worried about rss's over ~16 TB? If we weren't, we could just use an atomic_t for this problem. We can't. This patch

Re: [PATCH] mm->rss is modified without page_table_lock held

2000-12-08 Thread Mark Hahn
> The following patch moves the page_table_lock in mm/* to cover the > modification of mm->rss in 240-test12-pre7. It was inspired by a can't we just change rss to count pages? or are we worried about rss's over ~16 TB? - To unsubscribe from this list: send the line "unsubscribe linux-kernel"

[PATCH] mm->rss is modified without page_table_lock held

2000-12-08 Thread Rasmus Andersen
Hi. The following patch moves the page_table_lock in mm/* to cover the modification of mm->rss in 240-test12-pre7. It was inspired by a similar patch from davej(?) which covered too much, AFAIR. The item is on Tytso's ToDo list. Please comment. diff -Naur linux-240-t12-pre7-clean/mm/memory.c