linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] latest radix-tree pagecache patch and 2.4.19-pre3-ac6
@ 2002-03-25 17:49 Art Haas
  2002-03-25 18:43 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Art Haas @ 2002-03-25 17:49 UTC (permalink / raw)
  To: linux-mm

[-- Attachment #1: Type: text/plain, Size: 1467 bytes --]

Hi.

I've managed to cobble together a patch which takes the latest
radix-tree code and makes it "work" with the rmap code in
2.4.19-pre3-ac6. I'm running the kernel with this patch right
now, and I've got KDE, Konqueror, and Xemacs running, and things
look good. I'm usually using swap space at this point, but with
the patch I'm not yet doing so. Maybe this is part of the
benefits of the patch, or maybe I've screwed things up
but haven't yet tripped. I'd be grateful for a second or
third pair of eyes to look over this, to see if what
I've got looks reasonable. If it does, I'll send it out
the the kernel mailing list.

The original radix-tree patch applies fairly cleanly to the
-ac6 tree, but there are a few files that need touching up. The
mm/vmscan.c, mm/filemap.c, and mm/shmem.c files needed the
most attention. For vmscan.c, a couple of pieces in the original
patch were dropped, as it looks like they'll only apply (or
make sense) with the non-rmap code. As for filemap.c, a few
changes seemed to conflict with the rmap code, so my efforts
to make a compilable file may have broken the code. But hey,
I got a `.o' file from the compiler, so it must work, right? :-)

My thanks to everyone working on the VM code, and the radix-tree
patches. Comments (and fixes) welcomed.

-- 
They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety.
 -- Benjamin Franklin, Historical Review of Pennsylvania, 1759

[-- Attachment #2: radix-tree-2419p3ac6.patch.bz2 --]
[-- Type: application/octet-stream, Size: 12230 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] latest radix-tree pagecache patch and 2.4.19-pre3-ac6
  2002-03-25 17:49 [PATCH] latest radix-tree pagecache patch and 2.4.19-pre3-ac6 Art Haas
@ 2002-03-25 18:43 ` Christoph Hellwig
  2002-03-25 22:05   ` Art Haas
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2002-03-25 18:43 UTC (permalink / raw)
  To: Art Haas; +Cc: linux-mm

On Mon, Mar 25, 2002 at 11:49:47AM -0600, Art Haas wrote:
> Hi.
> 
> The original radix-tree patch applies fairly cleanly to the
> -ac6 tree, but there are a few files that need touching up. The
> mm/vmscan.c, mm/filemap.c, and mm/shmem.c files needed the
> most attention. For vmscan.c, a couple of pieces in the original
> patch were dropped, as it looks like they'll only apply (or
> make sense) with the non-rmap code. As for filemap.c, a few
> changes seemed to conflict with the rmap code, so my efforts
> to make a compilable file may have broken the code. But hey,
> I got a `.o' file from the compiler, so it must work, right? :-)

I think I have found at least once obvious bug:

 a) this cannot actually compile, pagecache_lock is gone..
 b) find_get_page already does locking internally AND also
    grabs a reference to the page.

This should probably be just a radix_tree_lookup()

@@ -1064,7 +999,7 @@
 	spin_lock(&pagemap_lru_lock);
 	while (--index >= start) {
 		spin_lock(&pagecache_lock);
-		page = __find_page(mapping, index);
+		page = find_get_page(mapping, index);
 		spin_unlock(&pagecache_lock);
 		if (!page || !PageActive(page))
 			break;


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] latest radix-tree pagecache patch and 2.4.19-pre3-ac6
  2002-03-25 18:43 ` Christoph Hellwig
@ 2002-03-25 22:05   ` Art Haas
  0 siblings, 0 replies; 3+ messages in thread
From: Art Haas @ 2002-03-25 22:05 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-mm

On Mon, Mar 25, 2002 at 07:43:18PM +0100, Christoph Hellwig wrote:
>
> [ ... my comments ... ]
> 
> I think I have found at least once obvious bug:
> 
>  a) this cannot actually compile, pagecache_lock is gone..
>  b) find_get_page already does locking internally AND also
>     grabs a reference to the page.
> 
> This should probably be just a radix_tree_lookup()
> 
> @@ -1064,7 +999,7 @@
>  	spin_lock(&pagemap_lru_lock);
>  	while (--index >= start) {
>  		spin_lock(&pagecache_lock);
> -		page = __find_page(mapping, index);
> +		page = find_get_page(mapping, index);
>  		spin_unlock(&pagecache_lock);
>  		if (!page || !PageActive(page))
>  			break;
> 

The file does compile, and my kernel running now does have
the changes I've made. I must be picking up the variable
from somewhere else, and I can't say where that is right
now. Hmmmm ....

Thanks for looking over the patch. I'll make the change
and try things out. Thanks again for working on the radix-tree
patches!

-- 
They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety.
 -- Benjamin Franklin, Historical Review of Pennsylvania, 1759
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-03-25 22:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-25 17:49 [PATCH] latest radix-tree pagecache patch and 2.4.19-pre3-ac6 Art Haas
2002-03-25 18:43 ` Christoph Hellwig
2002-03-25 22:05   ` Art Haas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox