Re: innd mmap bug in 2.4.0-test12

2001-01-04 Thread Ralf Gerbig
Hi, * "Linus" == Linus Torvalds <[EMAIL PROTECTED]> writes: [...] > Almost nothing does that. innd is (sadly) the only regular thing that uses > this, which is why it's always innd that breaks, even if everything else > works. > And even innd is often compiled to use "write()" instead of

Re: innd mmap bug in 2.4.0-test12

2001-01-04 Thread Ralf Gerbig
Hi, * "Linus" == Linus Torvalds [EMAIL PROTECTED] writes: [...] Almost nothing does that. innd is (sadly) the only regular thing that uses this, which is why it's always innd that breaks, even if everything else works. And even innd is often compiled to use "write()" instead of shared

Re: innd mmap bug in 2.4.0-test12

2000-12-29 Thread Christoph Rohland
Chris Wedgwood <[EMAIL PROTECTED]> writes: > I would prefer we leave ramfs alone as is -- it makes an excellent > starting point for a new fs and is fairly simple to grok. If we are > to add any more complexity here like the size limiting patches or the > use of a backing store, I'd like to have

Re: innd mmap bug in 2.4.0-test12

2000-12-29 Thread Christoph Rohland
Chris Wedgwood [EMAIL PROTECTED] writes: I would prefer we leave ramfs alone as is -- it makes an excellent starting point for a new fs and is fairly simple to grok. If we are to add any more complexity here like the size limiting patches or the use of a backing store, I'd like to have this

Re: innd mmap bug in 2.4.0-test12 (UNIMPORTANT)

2000-12-28 Thread Pau
On Thu, 28 Dec 2000, Alan Cox wrote: > The ramfs maintainer has patches (in -ac) which deal with the size limiting > of RAMfs. I'm using it on a PDA and its really really nice to be able to > pop up a GUI app and drag the bar to '60% for apps' like other PDA systems ;) May I ask which PDA do

Re: [PATCH] Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Daniel Phillips
Linus Torvalds wrote: > Ok, pre-5 should have all the same places you found already fixed, but > please do give it some heavy-duty testing to make sure there isn't > anything hidden.. I've beaten on it fairly heavily with the BUG in there as you suggested, with no problems. This kernel even

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Mo McKinlay
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > does anyone other than me think that the pm code is *way* too agressive about > spinning down the hard drive? my 256mb laptop (2.2.16) will only spin down the > disk for about 30 seconds before it decides it's got something else it feels >

Re: [PATCH] Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Linus Torvalds
On Thu, 28 Dec 2000, Daniel Phillips wrote: > > OK, I see you just posted -pre5 while I was making the patch, but here > it is anyway, as a cross-check. Ok, pre-5 should have all the same places you found already fixed, but please do give it some heavy-duty testing to make sure there isn't

Re: [PATCH] Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Daniel Phillips
Linus Torvalds wrote: > We don't want to lose dirty bits by mistake. The only cases where it's ok > to clear the dirty bit is when we truncate a page completely (so it won't > be needed and obviously really shouldn't be written out) and when we've > lost the last user of a swap cache entry. > >

Re: [PATCH] Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Daniel Phillips
Linus Torvalds wrote: > No, I'd much rather have > > if (PageDirty(page)) BUG(); > > there, and then have the free_swap_cache code clear the dirty bit. > > We don't want to lose dirty bits by mistake. The only cases where it's ok > to clear the dirty bit is when we truncate a page

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Alan Cox
> > I use ramfs for /tmp on my laptop -- it's very handy because it > > extends the amount of the the disk had spent spun down and therefore > > battery life; but writing large files into /tmp can blow away the > > system or at the very least eat away at otherwise usable ram. Not > > terribly

Re: [PATCH] Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Linus Torvalds
On Thu, 28 Dec 2000, Daniel Phillips wrote: > [in vmscan.c] > > Between line 573 and 594 the page can have 1 user and be unlocked, so it > > can be removed by invalidate_inode_pages, and the mapping will be > > cleared here: > >

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Linus Torvalds
On Thu, 28 Dec 2000, Chris Wedgwood wrote: > > this remind me; perhaps you or Al could answer this. > > How hard would it be to have ramfs backed by swap? The goal being > try to achieve something like a FreeBSDs mfs. > > I use ramfs for /tmp on my laptop -- it's very handy because it >

[PATCH] Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Daniel Phillips
[in vmscan.c] > Between line 573 and 594 the page can have 1 user and be unlocked, so it > can be removed by invalidate_inode_pages, and the mapping will be > cleared here: > http://innominate.org/~graichen/projects/lxr/source/mm/filemap.c?v=v2.3#L98 This seems like the obvious thing to do: ---

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Chris Mason
On Thursday, December 28, 2000 15:51:24 -0200 Rik van Riel <[EMAIL PROTECTED]> wrote: > On Thu, 28 Dec 2000, Chris Mason wrote: > >> I think a dirty page without a writepage func seems a bit >> broken. How about we give ramfs a writepage func that just >> returns 1. That way nobody does any

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Rik van Riel
On Thu, 28 Dec 2000, Linus Torvalds wrote: > On Thu, 28 Dec 2000, Rik van Riel wrote: > > > > I've made a small debugging patch that simply checks > > for this illegal state in add_page_to_active_list and > > add_page_to_inactive_dirty_list. > > I bet it won't catch the real bad guy, which

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Rik van Riel
On Thu, 28 Dec 2000, Chris Mason wrote: > I think a dirty page without a writepage func seems a bit > broken. How about we give ramfs a writepage func that just > returns 1. That way nobody does any special if > (ramfs_page(page)) kinds of tests... This will lead to the ramfs pages staying on

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Linus Torvalds
On Thu, 28 Dec 2000, Daniel Phillips wrote: > > It's logical that PageDirty should never be get for ramfs, and a ramfs > page should never have buffers on it. What? No no no. You're obviously right that ramfs will never have buffers on the page, but why shouldn't a ramfs page be dirty? Of

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Chris Mason
On Thursday, December 28, 2000 16:15:48 +0100 Daniel Phillips <[EMAIL PROTECTED]> wrote: > On Thu, 28 Dec 2000, Rik van Riel wrote: >> On Thu, 28 Dec 2000, Daniel Phillips wrote: >> >> > It's logical that PageDirty should never be get for ramfs, >> >> No. Not setting PageDirty will cause the

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Linus Torvalds
On Thu, 28 Dec 2000, Rik van Riel wrote: > > I've made a small debugging patch that simply checks > for this illegal state in add_page_to_active_list and > add_page_to_inactive_dirty_list. I bet it won't catch the real bad guy, which almost certainly is the "remove_from_swap_cache()" thing

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Daniel Phillips
Rik van Riel wrote: > > On Thu, 28 Dec 2000, Rik van Riel wrote: > > On Wed, 27 Dec 2000, Linus Torvalds wrote: > > > On Wed, 27 Dec 2000, Rik van Riel wrote: > > > > > > > > The (trivial) patch below should fix this problem. > > > > > > It must be wrong. > > > > > > If we have a dirty page on

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Daniel Phillips
On Thu, 28 Dec 2000, Rik van Riel wrote: > On Thu, 28 Dec 2000, Daniel Phillips wrote: > > > It's logical that PageDirty should never be get for ramfs, > > No. Not setting PageDirty will cause the system to move the > page to the inactive_clean list and happily reclaim your data. > > We _have

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Rik van Riel
On Thu, 28 Dec 2000, Daniel Phillips wrote: > It's logical that PageDirty should never be get for ramfs, No. Not setting PageDirty will cause the system to move the page to the inactive_clean list and happily reclaim your data. We _have to_ use something like PageDirty for this, and checking

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Daniel Phillips
Linus Torvalds wrote: > > On Wed, 27 Dec 2000, Philipp Rumpf wrote: > > > On Wed, Dec 27, 2000 at 03:41:04PM -0800, Linus Torvalds wrote: > > > It must be wrong. > > > > > > If we have a dirty page on the LRU lists, that page _must_ have a mapping. > > > > What about pages with a mapping but

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Rik van Riel
On Thu, 28 Dec 2000, Rik van Riel wrote: > On Wed, 27 Dec 2000, Linus Torvalds wrote: > > On Wed, 27 Dec 2000, Rik van Riel wrote: > > > > > > The (trivial) patch below should fix this problem. > > > > It must be wrong. > > > > If we have a dirty page on the LRU lists, that page _must_ have >

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Daniel Phillips
Zlatko Calusic wrote: > > Rik van Riel <[EMAIL PROTECTED]> writes: > > > On Mon, 25 Dec 2000, Dan Aloni wrote: > > > On 25 Dec 2000, Zlatko Calusic wrote: > > > > > > > Speaking of page_launder() I just stumbled upon two oopsen today on > > > > the UP build. Maybe it could give a hint to someone,

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Rik van Riel
On Wed, 27 Dec 2000, Linus Torvalds wrote: > On Wed, 27 Dec 2000, Rik van Riel wrote: > > > > The (trivial) patch below should fix this problem. > > It must be wrong. > > If we have a dirty page on the LRU lists, that page _must_ have > a mapping. Hmm, last I looked buffercache pages didn't

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Alan Cox
> does anyone other than me think that the pm code is *way* too agressive about > spinning down the hard drive? my 256mb laptop (2.2.16) will only spin down the > disk for about 30 seconds before it decides it's got something else it feels > like writing out, and spins back up. Spinnup has got to

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Alan Cox
does anyone other than me think that the pm code is *way* too agressive about spinning down the hard drive? my 256mb laptop (2.2.16) will only spin down the disk for about 30 seconds before it decides it's got something else it feels like writing out, and spins back up. Spinnup has got to be

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Rik van Riel
On Wed, 27 Dec 2000, Linus Torvalds wrote: On Wed, 27 Dec 2000, Rik van Riel wrote: The (trivial) patch below should fix this problem. It must be wrong. If we have a dirty page on the LRU lists, that page _must_ have a mapping. Hmm, last I looked buffercache pages didn't have

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Daniel Phillips
Zlatko Calusic wrote: Rik van Riel [EMAIL PROTECTED] writes: On Mon, 25 Dec 2000, Dan Aloni wrote: On 25 Dec 2000, Zlatko Calusic wrote: Speaking of page_launder() I just stumbled upon two oopsen today on the UP build. Maybe it could give a hint to someone, I'm not that good

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Rik van Riel
On Thu, 28 Dec 2000, Rik van Riel wrote: On Wed, 27 Dec 2000, Linus Torvalds wrote: On Wed, 27 Dec 2000, Rik van Riel wrote: The (trivial) patch below should fix this problem. It must be wrong. If we have a dirty page on the LRU lists, that page _must_ have a mapping.

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Daniel Phillips
Linus Torvalds wrote: On Wed, 27 Dec 2000, Philipp Rumpf wrote: On Wed, Dec 27, 2000 at 03:41:04PM -0800, Linus Torvalds wrote: It must be wrong. If we have a dirty page on the LRU lists, that page _must_ have a mapping. What about pages with a mapping but without a writepage

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Rik van Riel
On Thu, 28 Dec 2000, Daniel Phillips wrote: It's logical that PageDirty should never be get for ramfs, No. Not setting PageDirty will cause the system to move the page to the inactive_clean list and happily reclaim your data. We _have to_ use something like PageDirty for this, and checking

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Daniel Phillips
On Thu, 28 Dec 2000, Rik van Riel wrote: On Thu, 28 Dec 2000, Daniel Phillips wrote: It's logical that PageDirty should never be get for ramfs, No. Not setting PageDirty will cause the system to move the page to the inactive_clean list and happily reclaim your data. We _have to_ use

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Daniel Phillips
Rik van Riel wrote: On Thu, 28 Dec 2000, Rik van Riel wrote: On Wed, 27 Dec 2000, Linus Torvalds wrote: On Wed, 27 Dec 2000, Rik van Riel wrote: The (trivial) patch below should fix this problem. It must be wrong. If we have a dirty page on the LRU lists, that page

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Linus Torvalds
On Thu, 28 Dec 2000, Rik van Riel wrote: I've made a small debugging patch that simply checks for this illegal state in add_page_to_active_list and add_page_to_inactive_dirty_list. I bet it won't catch the real bad guy, which almost certainly is the "remove_from_swap_cache()" thing (it

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Chris Mason
On Thursday, December 28, 2000 16:15:48 +0100 Daniel Phillips [EMAIL PROTECTED] wrote: On Thu, 28 Dec 2000, Rik van Riel wrote: On Thu, 28 Dec 2000, Daniel Phillips wrote: It's logical that PageDirty should never be get for ramfs, No. Not setting PageDirty will cause the system to

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Linus Torvalds
On Thu, 28 Dec 2000, Daniel Phillips wrote: It's logical that PageDirty should never be get for ramfs, and a ramfs page should never have buffers on it. What? No no no. You're obviously right that ramfs will never have buffers on the page, but why shouldn't a ramfs page be dirty? Of

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Rik van Riel
On Thu, 28 Dec 2000, Chris Mason wrote: I think a dirty page without a writepage func seems a bit broken. How about we give ramfs a writepage func that just returns 1. That way nobody does any special if (ramfs_page(page)) kinds of tests... This will lead to the ramfs pages staying on the

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Rik van Riel
On Thu, 28 Dec 2000, Linus Torvalds wrote: On Thu, 28 Dec 2000, Rik van Riel wrote: I've made a small debugging patch that simply checks for this illegal state in add_page_to_active_list and add_page_to_inactive_dirty_list. I bet it won't catch the real bad guy, which almost

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Chris Mason
On Thursday, December 28, 2000 15:51:24 -0200 Rik van Riel [EMAIL PROTECTED] wrote: On Thu, 28 Dec 2000, Chris Mason wrote: I think a dirty page without a writepage func seems a bit broken. How about we give ramfs a writepage func that just returns 1. That way nobody does any special

[PATCH] Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Daniel Phillips
[in vmscan.c] Between line 573 and 594 the page can have 1 user and be unlocked, so it can be removed by invalidate_inode_pages, and the mapping will be cleared here: http://innominate.org/~graichen/projects/lxr/source/mm/filemap.c?v=v2.3#L98 This seems like the obvious thing to do: ---

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Linus Torvalds
On Thu, 28 Dec 2000, Chris Wedgwood wrote: this remind me; perhaps you or Al could answer this. How hard would it be to have ramfs backed by swap? The goal being try to achieve something like a FreeBSDs mfs. I use ramfs for /tmp on my laptop -- it's very handy because it extends

Re: [PATCH] Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Linus Torvalds
On Thu, 28 Dec 2000, Daniel Phillips wrote: [in vmscan.c] Between line 573 and 594 the page can have 1 user and be unlocked, so it can be removed by invalidate_inode_pages, and the mapping will be cleared here:

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Alan Cox
I use ramfs for /tmp on my laptop -- it's very handy because it extends the amount of the the disk had spent spun down and therefore battery life; but writing large files into /tmp can blow away the system or at the very least eat away at otherwise usable ram. Not terribly desirable.

Re: [PATCH] Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Daniel Phillips
Linus Torvalds wrote: No, I'd much rather have if (PageDirty(page)) BUG(); there, and then have the free_swap_cache code clear the dirty bit. We don't want to lose dirty bits by mistake. The only cases where it's ok to clear the dirty bit is when we truncate a page completely

Re: [PATCH] Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Daniel Phillips
Linus Torvalds wrote: We don't want to lose dirty bits by mistake. The only cases where it's ok to clear the dirty bit is when we truncate a page completely (so it won't be needed and obviously really shouldn't be written out) and when we've lost the last user of a swap cache entry. Any

Re: [PATCH] Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Linus Torvalds
On Thu, 28 Dec 2000, Daniel Phillips wrote: OK, I see you just posted -pre5 while I was making the patch, but here it is anyway, as a cross-check. Ok, pre-5 should have all the same places you found already fixed, but please do give it some heavy-duty testing to make sure there isn't

Re: innd mmap bug in 2.4.0-test12

2000-12-28 Thread Mo McKinlay
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 does anyone other than me think that the pm code is *way* too agressive about spinning down the hard drive? my 256mb laptop (2.2.16) will only spin down the disk for about 30 seconds before it decides it's got something else it feels

Re: innd mmap bug in 2.4.0-test12 (UNIMPORTANT)

2000-12-28 Thread Pau
On Thu, 28 Dec 2000, Alan Cox wrote: The ramfs maintainer has patches (in -ac) which deal with the size limiting of RAMfs. I'm using it on a PDA and its really really nice to be able to pop up a GUI app and drag the bar to '60% for apps' like other PDA systems ;) May I ask which PDA do you

Re: innd mmap bug in 2.4.0-test12

2000-12-27 Thread Ari Heitner
On Thu, 28 Dec 2000, Chris Wedgwood wrote: > (cc' list trimmed) [further] > I use ramfs for /tmp on my laptop -- it's very handy because it > extends the amount of the the disk had spent spun down and therefore > battery life; but writing large files into /tmp can blow away the > system or at

Re: innd mmap bug in 2.4.0-test12

2000-12-27 Thread Dan Aloni
On Thu, 28 Dec 2000, Dan Aloni wrote: > On Wed, 27 Dec 2000, Philipp Rumpf wrote: > > > On Wed, Dec 27, 2000 at 03:41:04PM -0800, Linus Torvalds wrote: > > > It must be wrong. > > > > > > If we have a dirty page on the LRU lists, that page _must_ have a mapping. > > > > What about pages with

Re: innd mmap bug in 2.4.0-test12

2000-12-27 Thread Dan Aloni
On Wed, 27 Dec 2000, Philipp Rumpf wrote: > On Wed, Dec 27, 2000 at 03:41:04PM -0800, Linus Torvalds wrote: > > It must be wrong. > > > > If we have a dirty page on the LRU lists, that page _must_ have a mapping. > > What about pages with a mapping but without a writepage function ? or pages >

Re: innd mmap bug in 2.4.0-test12

2000-12-27 Thread Linus Torvalds
On Wed, 27 Dec 2000, Philipp Rumpf wrote: > On Wed, Dec 27, 2000 at 03:41:04PM -0800, Linus Torvalds wrote: > > It must be wrong. > > > > If we have a dirty page on the LRU lists, that page _must_ have a mapping. > > What about pages with a mapping but without a writepage function ? or pages

Re: innd mmap bug in 2.4.0-test12

2000-12-27 Thread Philipp Rumpf
On Wed, Dec 27, 2000 at 03:41:04PM -0800, Linus Torvalds wrote: > It must be wrong. > > If we have a dirty page on the LRU lists, that page _must_ have a mapping. What about pages with a mapping but without a writepage function ? or pages whose writepage function fails ? The current code seems

Re: innd mmap bug in 2.4.0-test12

2000-12-27 Thread Linus Torvalds
On Wed, 27 Dec 2000, Rik van Riel wrote: > > The (trivial) patch below should fix this problem. It must be wrong. If we have a dirty page on the LRU lists, that page _must_ have a mapping. What semantics would you say a non-mapped page has? What are the LRU routines supposed to do with such

Re: innd mmap bug in 2.4.0-test12

2000-12-27 Thread Zlatko Calusic
Rik van Riel <[EMAIL PROTECTED]> writes: > On Mon, 25 Dec 2000, Dan Aloni wrote: > > On 25 Dec 2000, Zlatko Calusic wrote: > > > > > Speaking of page_launder() I just stumbled upon two oopsen today on > > > the UP build. Maybe it could give a hint to someone, I'm not that good > > > at Oops

Re: innd mmap bug in 2.4.0-test12

2000-12-27 Thread Rik van Riel
On Mon, 25 Dec 2000, Dan Aloni wrote: > On 25 Dec 2000, Zlatko Calusic wrote: > > > Speaking of page_launder() I just stumbled upon two oopsen today on > > the UP build. Maybe it could give a hint to someone, I'm not that good > > at Oops decoding. > > I've decoded the Oops I got, and found

Re: innd mmap bug in 2.4.0-test12

2000-12-27 Thread Alan Cox
> I can just imagine Xmas at the Torvalds residence, with their annual=20 > tradition of having the kids scream... But dad, other kids have the lig= > hts=20 > strung around the trees, not the computer I don't think you get the full picture. I suspect what gets strung up on the trees at

Re: innd mmap bug in 2.4.0-test12

2000-12-27 Thread Anton Blanchard
> This all only matters to things that do shared writable mmap's. > > Almost nothing does that. innd is (sadly) the only regular thing that uses > this, which is why it's always innd that breaks, even if everything else > works. btw samba 2.2 makes extensive use of shared writable mmaps (well

Re: innd mmap bug in 2.4.0-test12

2000-12-27 Thread Anton Blanchard
This all only matters to things that do shared writable mmap's. Almost nothing does that. innd is (sadly) the only regular thing that uses this, which is why it's always innd that breaks, even if everything else works. btw samba 2.2 makes extensive use of shared writable mmaps (well it

Re: innd mmap bug in 2.4.0-test12

2000-12-27 Thread Alan Cox
I can just imagine Xmas at the Torvalds residence, with their annual=20 tradition of having the kids scream... But dad, other kids have the lig= hts=20 strung around the trees, not the computer I don't think you get the full picture. I suspect what gets strung up on the trees at

Re: innd mmap bug in 2.4.0-test12

2000-12-27 Thread Rik van Riel
On Mon, 25 Dec 2000, Dan Aloni wrote: On 25 Dec 2000, Zlatko Calusic wrote: Speaking of page_launder() I just stumbled upon two oopsen today on the UP build. Maybe it could give a hint to someone, I'm not that good at Oops decoding. I've decoded the Oops I got, and found that the

Re: innd mmap bug in 2.4.0-test12

2000-12-27 Thread Zlatko Calusic
Rik van Riel [EMAIL PROTECTED] writes: On Mon, 25 Dec 2000, Dan Aloni wrote: On 25 Dec 2000, Zlatko Calusic wrote: Speaking of page_launder() I just stumbled upon two oopsen today on the UP build. Maybe it could give a hint to someone, I'm not that good at Oops decoding. I've

Re: innd mmap bug in 2.4.0-test12

2000-12-27 Thread Linus Torvalds
On Wed, 27 Dec 2000, Rik van Riel wrote: The (trivial) patch below should fix this problem. It must be wrong. If we have a dirty page on the LRU lists, that page _must_ have a mapping. What semantics would you say a non-mapped page has? What are the LRU routines supposed to do with such a

Re: innd mmap bug in 2.4.0-test12

2000-12-27 Thread Philipp Rumpf
On Wed, Dec 27, 2000 at 03:41:04PM -0800, Linus Torvalds wrote: It must be wrong. If we have a dirty page on the LRU lists, that page _must_ have a mapping. What about pages with a mapping but without a writepage function ? or pages whose writepage function fails ? The current code seems to

Re: innd mmap bug in 2.4.0-test12

2000-12-27 Thread Linus Torvalds
On Wed, 27 Dec 2000, Philipp Rumpf wrote: On Wed, Dec 27, 2000 at 03:41:04PM -0800, Linus Torvalds wrote: It must be wrong. If we have a dirty page on the LRU lists, that page _must_ have a mapping. What about pages with a mapping but without a writepage function ? or pages whose

Re: innd mmap bug in 2.4.0-test12

2000-12-27 Thread Dan Aloni
On Wed, 27 Dec 2000, Philipp Rumpf wrote: On Wed, Dec 27, 2000 at 03:41:04PM -0800, Linus Torvalds wrote: It must be wrong. If we have a dirty page on the LRU lists, that page _must_ have a mapping. What about pages with a mapping but without a writepage function ? or pages whose

Re: innd mmap bug in 2.4.0-test12

2000-12-27 Thread Dan Aloni
On Thu, 28 Dec 2000, Dan Aloni wrote: On Wed, 27 Dec 2000, Philipp Rumpf wrote: On Wed, Dec 27, 2000 at 03:41:04PM -0800, Linus Torvalds wrote: It must be wrong. If we have a dirty page on the LRU lists, that page _must_ have a mapping. What about pages with a mapping but

Re: innd mmap bug in 2.4.0-test12

2000-12-27 Thread Ari Heitner
On Thu, 28 Dec 2000, Chris Wedgwood wrote: (cc' list trimmed) [further] I use ramfs for /tmp on my laptop -- it's very handy because it extends the amount of the the disk had spent spun down and therefore battery life; but writing large files into /tmp can blow away the system or at the

Re: innd mmap bug in 2.4.0-test12

2000-12-26 Thread Michael Peddemors
> Yeah, yeah, it's 7PM Christmas Eve over there, and you're in the middle of > your Christmas dinner. You might feel that it's unreasonable of me to ask > you to test out my latest crazy idea. > > How selfish of you. > > Get back there in front of the computer NOW. Christmas can wait. > >

Re: innd mmap bug in 2.4.0-test12

2000-12-26 Thread Linus Torvalds
On Mon, 25 Dec 2000, Alan Cox wrote: > > > The simple fix is along the lines of adding code to fsync() that walks the > > inode page list and writes out dirty pages. > > > > The clever and clean fix is to split the inode page list into two lists, > > one for dirty and one for clean pages, and

Re: innd mmap bug in 2.4.0-test12

2000-12-26 Thread Alan Cox
> The simple fix is along the lines of adding code to fsync() that walks the > inode page list and writes out dirty pages. > > The clever and clean fix is to split the inode page list into two lists, > one for dirty and one for clean pages, and only walk the dirty list. Like the patches that

Re: innd mmap bug in 2.4.0-test12

2000-12-26 Thread Alan Cox
The simple fix is along the lines of adding code to fsync() that walks the inode page list and writes out dirty pages. The clever and clean fix is to split the inode page list into two lists, one for dirty and one for clean pages, and only walk the dirty list. Like the patches that were

Re: innd mmap bug in 2.4.0-test12

2000-12-26 Thread Linus Torvalds
On Mon, 25 Dec 2000, Alan Cox wrote: The simple fix is along the lines of adding code to fsync() that walks the inode page list and writes out dirty pages. The clever and clean fix is to split the inode page list into two lists, one for dirty and one for clean pages, and only walk

Re: innd mmap bug in 2.4.0-test12

2000-12-26 Thread Michael Peddemors
Yeah, yeah, it's 7PM Christmas Eve over there, and you're in the middle of your Christmas dinner. You might feel that it's unreasonable of me to ask you to test out my latest crazy idea. How selfish of you. Get back there in front of the computer NOW. Christmas can wait.

Re: innd mmap bug in 2.4.0-test12

2000-12-25 Thread Linus Torvalds
On Tue, 26 Dec 2000, Chris Wedgwood wrote: > On Mon, Dec 25, 2000 at 01:42:33AM -0800, Linus Torvalds wrote: > > We just don't write them out. Because right now the only thing > that writes out dirty pages is memory pressure. "sync()", > "fsync()" and "fdatasync()" will happily

Re: innd mmap bug in 2.4.0-test12

2000-12-25 Thread Linus Torvalds
On Mon, 25 Dec 2000, Marco d'Itri wrote: > > >Do you get any messages? I don't think you will, but it should be tested. > > I read you found the real cause so that may be bogus, but I have got two > messages while booting. The first showed up while doing the fsck of a 6 > GB file systems and

Re: innd mmap bug in 2.4.0-test12

2000-12-25 Thread Marco d'Itri
On Dec 25, Linus Torvalds <[EMAIL PROTECTED]> wrote: >Add a printk() to __remove_inode_page() that complains whenever it removes >a dirty page. > >Oh, in order to not see this with swap pages (which _can_ be removed when >they are dirty, if all users of them are gone), add a

Re: innd mmap bug in 2.4.0-test12

2000-12-25 Thread Linus Torvalds
On Mon, 25 Dec 2000, Linus Torvalds wrote: > > Assuming we don't lose any PG_dirty bits, we might of course just lose it > from the page tables themselves before it ever even gets to "struct page". > I'm just surprised that it seems to be so repeatable for you - it sounds > like we _never_

Re: innd mmap bug in 2.4.0-test12

2000-12-25 Thread Linus Torvalds
On Mon, 25 Dec 2000, Marco d'Itri wrote: > On Dec 24, Linus Torvalds <[EMAIL PROTECTED]> wrote: > > >/* The page is dirty, or locked, move to inactive_dirty list. */ > >if (page->buffers || TryLockPage(page)) { > >... > > > >and change the test to > > > >if

Re: innd mmap bug in 2.4.0-test12

2000-12-25 Thread Linus Torvalds
On Mon, 25 Dec 2000, Marco d'Itri wrote: On Dec 24, Linus Torvalds [EMAIL PROTECTED] wrote: /* The page is dirty, or locked, move to inactive_dirty list. */ if (page-buffers || TryLockPage(page)) { ... and change the test to if (page-buffers ||

Re: innd mmap bug in 2.4.0-test12

2000-12-25 Thread Linus Torvalds
On Mon, 25 Dec 2000, Linus Torvalds wrote: Assuming we don't lose any PG_dirty bits, we might of course just lose it from the page tables themselves before it ever even gets to "struct page". I'm just surprised that it seems to be so repeatable for you - it sounds like we _never_ actually

Re: innd mmap bug in 2.4.0-test12

2000-12-25 Thread Marco d'Itri
On Dec 25, Linus Torvalds [EMAIL PROTECTED] wrote: Add a printk() to __remove_inode_page() that complains whenever it removes a dirty page. Oh, in order to not see this with swap pages (which _can_ be removed when they are dirty, if all users of them are gone), add a PageClearDirty() to

Re: innd mmap bug in 2.4.0-test12

2000-12-25 Thread Linus Torvalds
On Mon, 25 Dec 2000, Marco d'Itri wrote: Do you get any messages? I don't think you will, but it should be tested. I read you found the real cause so that may be bogus, but I have got two messages while booting. The first showed up while doing the fsck of a 6 GB file systems and killed

Re: innd mmap bug in 2.4.0-test12

2000-12-25 Thread Linus Torvalds
On Tue, 26 Dec 2000, Chris Wedgwood wrote: On Mon, Dec 25, 2000 at 01:42:33AM -0800, Linus Torvalds wrote: We just don't write them out. Because right now the only thing that writes out dirty pages is memory pressure. "sync()", "fsync()" and "fdatasync()" will happily ignore

Re: innd mmap bug in 2.4.0-test12

2000-12-24 Thread Augusto César Radtke
Marco d'Itri wrote: > And I have another problem: I'm experiencing random hangs using X[1] with > 2.4.0-test12. After a variable amount of time, some of the times I use X > (I mostly use console) it just freezes hard (no caps lock activity). > I'm not sure if this only happens while using X or

Re: innd mmap bug in 2.4.0-test12

2000-12-24 Thread Dan Aloni
On 25 Dec 2000, Zlatko Calusic wrote: > Linus Torvalds <[EMAIL PROTECTED]> writes: > > > On Sun, 24 Dec 2000, Linus Torvalds wrote: > > > > > > Marco, would you mind changing the test in reclaim_page(), somewheer > > > around line mm/vmscan.c:487 that says: > > > > Speaking of page_launder()

Re: innd mmap bug in 2.4.0-test12

2000-12-24 Thread Marco d'Itri
On Dec 24, Linus Torvalds <[EMAIL PROTECTED]> wrote: > /* The page is dirty, or locked, move to inactive_dirty list. */ > if (page->buffers || TryLockPage(page)) { > ... > >and change the test to > > if (page->buffers || PageDirty(page) || TryLockPage(page)) {

Re: innd mmap bug in 2.4.0-test12

2000-12-24 Thread Zlatko Calusic
Linus Torvalds <[EMAIL PROTECTED]> writes: > On Sun, 24 Dec 2000, Linus Torvalds wrote: > > > > Marco, would you mind changing the test in reclaim_page(), somewheer > > around line mm/vmscan.c:487 that says: > Speaking of page_launder() I just stumbled upon two oopsen today on the UP build.

Re: innd mmap bug in 2.4.0-test12

2000-12-24 Thread Linus Torvalds
On Sun, 24 Dec 2000, Daniel Phillips wrote: > > It looks like PG_dirty is now being used only for swap_cache pages, and > not for buffer cache and page cache pages, is that correct? No. PG_dirty is used for all memory mapped pages - be they anonymous or not. These days the buffer dirty

Re: innd mmap bug in 2.4.0-test12

2000-12-24 Thread Daniel Phillips
Linus Torvalds wrote: > Hmm.. I wonder if such a dirty page might have been moved to the > "inactive_clean" list some way? It shouldn't really be there, as the page > had users, but if it gets on that list we'd not have tested the dirty bit. > > Marco, would you mind changing the test in

Re: innd mmap bug in 2.4.0-test12

2000-12-24 Thread Dietmar Kling
> > Get back there in front of the computer NOW. Christmas can wait. > > Linus "the Grinch" Torvalds Hoo - Hoo - Hoo, you've been very naughty Linus. Asking people to work on Christmas evening. My god Linus, that's so naughty that I add it to my list... As soon as I'm

Re: innd mmap bug in 2.4.0-test12

2000-12-24 Thread Linus Torvalds
On Sun, 24 Dec 2000, Linus Torvalds wrote: > > Marco, would you mind changing the test in reclaim_page(), somewheer > around line mm/vmscan.c:487 that says: Yeah, yeah, it's 7PM Christmas Eve over there, and you're in the middle of your Christmas dinner. You might feel that it's unreasonable

Re: innd mmap bug in 2.4.0-test12

2000-12-24 Thread Linus Torvalds
On Sun, 24 Dec 2000, Marco d'Itri wrote: > On Dec 24, Alexander Viro <[EMAIL PROTECTED]> wrote: > > >> I put "cp active active.ok" in the rc file before shutting down the > >> daemon and at the next boot the files are different, every time. > > > >Could you send me both files? BTW, which

Re: innd mmap bug in 2.4.0-test12

2000-12-24 Thread Marco d'Itri
On Dec 24, Alexander Viro <[EMAIL PROTECTED]> wrote: >> I put "cp active active.ok" in the rc file before shutting down the >> daemon and at the next boot the files are different, every time. > >Could you send me both files? BTW, which filesystem it is? I use ext2. The files are not

Re: innd mmap bug in 2.4.0-test12

2000-12-24 Thread Jeff Lightfoot
"Marco d'Itri" ([EMAIL PROTECTED]) wrote: > I can confirm the bug which loses updates to the inn active file when > it's unmapped is present again in 2.4.0-test12. It is also still in 2.4.0-test13-pre4 in case someone thought they had fixed it. -- Jeff Lightfoot --jeffml at pobox.com

innd mmap bug in 2.4.0-test12

2000-12-24 Thread Marco d'Itri
I can confirm the bug which loses updates to the inn active file when it's unmapped is present again in 2.4.0-test12. I put "cp active active.ok" in the rc file before shutting down the daemon and at the next boot the files are different, every time. Alexander Viro posted this test case:

innd mmap bug in 2.4.0-test12

2000-12-24 Thread Marco d'Itri
I can confirm the bug which loses updates to the inn active file when it's unmapped is present again in 2.4.0-test12. I put "cp active active.ok" in the rc file before shutting down the daemon and at the next boot the files are different, every time. Alexander Viro posted this test case:

  1   2   >