* RAMFS
@ 2001-02-02 15:51 Alan Cox
2001-02-02 17:57 ` RAMFS Ingo Oeser
0 siblings, 1 reply; 6+ messages in thread
From: Alan Cox @ 2001-02-02 15:51 UTC (permalink / raw)
To: linux-kernel
Random quick poking
Does this fix the ramfs problem in -ac ?
--- fs/ramfs/inode.c~ Wed Jan 31 22:02:16 2001
+++ fs/ramfs/inode.c Fri Feb 2 14:51:47 2001
@@ -174,7 +174,6 @@
inode->i_blocks += IBLOCKS_PER_PAGE;
rsb->free_pages--;
SetPageDirty(page);
- UnlockPage(page);
} else {
ClearPageUptodate(page);
ret = 0;
@@ -264,6 +263,7 @@
if (! ramfs_alloc_page(inode, page))
return -ENOSPC;
+ UnlockPage(page);
return 0;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RAMFS
2001-02-02 15:51 RAMFS Alan Cox
@ 2001-02-02 17:57 ` Ingo Oeser
2001-02-02 19:24 ` RAMFS Mike Galbraith
0 siblings, 1 reply; 6+ messages in thread
From: Ingo Oeser @ 2001-02-02 17:57 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-kernel
On Fri, Feb 02, 2001 at 03:51:53PM +0000, Alan Cox wrote:
> Does this fix the ramfs problem in -ac ?
>
> --- fs/ramfs/inode.c~ Wed Jan 31 22:02:16 2001
> +++ fs/ramfs/inode.c Fri Feb 2 14:51:47 2001
> @@ -174,7 +174,6 @@
> inode->i_blocks += IBLOCKS_PER_PAGE;
> rsb->free_pages--;
> SetPageDirty(page);
> - UnlockPage(page);
> } else {
> ClearPageUptodate(page);
> ret = 0;
> @@ -264,6 +263,7 @@
>
> if (! ramfs_alloc_page(inode, page))
> return -ENOSPC;
> + UnlockPage(page);
> return 0;
> }
No, so have to unlock it also, if you return -ENOSPC.
So the correct fix seems to be:
--- linux/fs/ramfs/inode.c~ Wed Jan 31 22:02:16 2001
+++ linux/fs/ramfs/inode.c Fri Feb 2 14:51:47 2001
@@ -174,7 +174,6 @@
inode->i_blocks += IBLOCKS_PER_PAGE;
rsb->free_pages--;
SetPageDirty(page);
- UnlockPage(page);
} else {
ClearPageUptodate(page);
ret = 0;
@@ -264,6 +263,9 @@
- if (! ramfs_alloc_page(inode, page))
+ if (! ramfs_alloc_page(inode, page)) {
+ UnlockPage(page);
return -ENOSPC;
+ }
+ UnlockPage(page);
return 0;
}
This currently works for me (but using 2.4.0 + dwg-ramfs.patch + this patch)
Regards
Ingo Oeser
--
10.+11.03.2001 - 3. Chemnitzer LinuxTag <http://www.tu-chemnitz.de/linux/tag>
<<<<<<<<<<<< come and join the fun >>>>>>>>>>>>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RAMFS
2001-02-02 17:57 ` RAMFS Ingo Oeser
@ 2001-02-02 19:24 ` Mike Galbraith
2001-02-02 20:41 ` RAMFS Ingo Oeser
0 siblings, 1 reply; 6+ messages in thread
From: Mike Galbraith @ 2001-02-02 19:24 UTC (permalink / raw)
To: Ingo Oeser; +Cc: Alan Cox, linux-kernel
On Fri, 2 Feb 2001, Ingo Oeser wrote:
> No, so have to unlock it also, if you return -ENOSPC.
>
> So the correct fix seems to be:
>
> --- linux/fs/ramfs/inode.c~ Wed Jan 31 22:02:16 2001
> +++ linux/fs/ramfs/inode.c Fri Feb 2 14:51:47 2001
> @@ -174,7 +174,6 @@
> inode->i_blocks += IBLOCKS_PER_PAGE;
> rsb->free_pages--;
> SetPageDirty(page);
> - UnlockPage(page);
> } else {
> ClearPageUptodate(page);
> ret = 0;
> @@ -264,6 +263,9 @@
>
> - if (! ramfs_alloc_page(inode, page))
> + if (! ramfs_alloc_page(inode, page)) {
> + UnlockPage(page);
> return -ENOSPC;
> + }
> + UnlockPage(page);
> return 0;
> }
>
> This currently works for me (but using 2.4.0 + dwg-ramfs.patch + this patch)
Have you stressed it? (I see leakiness)
-Mike
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RAMFS
2001-02-02 19:24 ` RAMFS Mike Galbraith
@ 2001-02-02 20:41 ` Ingo Oeser
2001-02-02 21:03 ` RAMFS Mike Galbraith
0 siblings, 1 reply; 6+ messages in thread
From: Ingo Oeser @ 2001-02-02 20:41 UTC (permalink / raw)
To: Mike Galbraith; +Cc: Alan Cox, linux-kernel, linux-fsdevel
On Fri, Feb 02, 2001 at 08:24:19PM +0100, Mike Galbraith wrote:
> On Fri, 2 Feb 2001, Ingo Oeser wrote:
> > No, so have to unlock it also, if you return -ENOSPC.
> >
> > So the correct fix seems to be:
[...]
> > This currently works for me (but using 2.4.0 + dwg-ramfs.patch + this patch)
>
> Have you stressed it? (I see leakiness)
I do reads and writes to it every 5 seconds and sometimes more (
mounted on /tmp, /var/run and the like ) and had an uptime of
about a week (I use it in an embedded-like system and we
sometimes change the system image).
There might be a dentry or inode leak, but that doesn't bite me,
because I only create the files I need once and extend or shrink
them.
But I couldn't stress it too much.
Where exactly do you see the leaks?
PS: For reference, I put the diff to 2.4.0 that I use to
http://www.tu-chemnitz.de/~ioe/dwg-ramfs.patch
The original patch has _not_ been done by me, but by
David Gibson, Linuxcare Australia.
PPS: It would be surprising anyway, if I used the right patch all
the time, while the wrong one was in acX. That's why I didn't
submit anything ;-)
Regards
Ingo Oeser
--
10.+11.03.2001 - 3. Chemnitzer LinuxTag <http://www.tu-chemnitz.de/linux/tag>
<<<<<<<<<<<< come and join the fun >>>>>>>>>>>>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RAMFS
2001-02-02 20:41 ` RAMFS Ingo Oeser
@ 2001-02-02 21:03 ` Mike Galbraith
2001-02-03 7:13 ` RAMFS Mike Galbraith
0 siblings, 1 reply; 6+ messages in thread
From: Mike Galbraith @ 2001-02-02 21:03 UTC (permalink / raw)
To: Ingo Oeser; +Cc: Alan Cox, linux-kernel, linux-fsdevel
On Fri, 2 Feb 2001, Ingo Oeser wrote:
> On Fri, Feb 02, 2001 at 08:24:19PM +0100, Mike Galbraith wrote:
> > On Fri, 2 Feb 2001, Ingo Oeser wrote:
> > > No, so have to unlock it also, if you return -ENOSPC.
> > >
> > > So the correct fix seems to be:
> [...]
> > > This currently works for me (but using 2.4.0 + dwg-ramfs.patch + this patch)
> >
> > Have you stressed it? (I see leakiness)
>
> I do reads and writes to it every 5 seconds and sometimes more (
> mounted on /tmp, /var/run and the like ) and had an uptime of
> about a week (I use it in an embedded-like system and we
> sometimes change the system image).
>
> There might be a dentry or inode leak, but that doesn't bite me,
> because I only create the files I need once and extend or shrink
> them.
That won't show it. I can do that kind of stuff all day long, no
problem whatsoever.
> But I couldn't stress it too much.
>
> Where exactly do you see the leaks?
(I don't have a solid grip yet.. just starting to seek)
> PS: For reference, I put the diff to 2.4.0 that I use to
> http://www.tu-chemnitz.de/~ioe/dwg-ramfs.patch
>
> The original patch has _not_ been done by me, but by
> David Gibson, Linuxcare Australia.
I'll take a look at this.. thanks.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RAMFS
2001-02-02 21:03 ` RAMFS Mike Galbraith
@ 2001-02-03 7:13 ` Mike Galbraith
0 siblings, 0 replies; 6+ messages in thread
From: Mike Galbraith @ 2001-02-03 7:13 UTC (permalink / raw)
To: Ingo Oeser; +Cc: Alan Cox, linux-kernel, linux-fsdevel
On Fri, 2 Feb 2001, Mike Galbraith wrote:
> > Where exactly do you see the leaks?
>
> (I don't have a solid grip yet.. just starting to seek)
Heh. I figured this must be a nice defenseless little buglet
I could pick on (ramfs is pretty darn simple). Critter might
not be quite as defenseless as I presumed ;-)
Using ramfs under vm pressure breaks (hmm.. spinlock) instantly
on my UP box.
-Mike
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2001-02-03 7:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-02 15:51 RAMFS Alan Cox
2001-02-02 17:57 ` RAMFS Ingo Oeser
2001-02-02 19:24 ` RAMFS Mike Galbraith
2001-02-02 20:41 ` RAMFS Ingo Oeser
2001-02-02 21:03 ` RAMFS Mike Galbraith
2001-02-03 7:13 ` RAMFS Mike Galbraith
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®