* [PATCH] mm/vmscan.c:shrink_list(): check PageSwapCache() after add_to_swap()
@ 2004-01-28 16:43 Nikita Danilov
2004-01-28 21:44 ` Andrew Morton
0 siblings, 1 reply; 8+ messages in thread
From: Nikita Danilov @ 2004-01-28 16:43 UTC (permalink / raw)
To: Andrew Morton, linux-mm
Hello,
shrink_list() checks PageSwapCache() before calling add_to_swap(), this
means that anonymous page that is going to be added to the swap right
now these checks return false and:
(*) it will be unaccounted for in nr_mapped, and
(*) it won't be written to the swap if gfp_flags include __GFP_IO but
not __GFP_FS.
(Both will happen only on the next round of scanning.)
Patch below just moves may_enter_fs initialization down. I am not sure
about (*nr_mapped) increase though.
Comments?
Nikita.
diff -puN -b mm/vmscan.c~check-PageSwapCache-after-add-to-swap mm/vmscan.c
--- i386/mm/vmscan.c~check-PageSwapCache-after-add-to-swap Wed Jan 28 19:22:14 2004
+++ i386-nikita/mm/vmscan.c Wed Jan 28 19:36:16 2004
@@ -380,8 +380,6 @@ shrink_list(struct list_head *page_list,
(*nr_mapped)++;
BUG_ON(PageActive(page));
- may_enter_fs = (gfp_mask & __GFP_FS) ||
- (PageSwapCache(page) && (gfp_mask & __GFP_IO));
if (PageWriteback(page))
goto keep_locked;
@@ -412,6 +410,9 @@ shrink_list(struct list_head *page_list,
}
#endif /* CONFIG_SWAP */
+ may_enter_fs = (gfp_mask & __GFP_FS) ||
+ (PageSwapCache(page) && (gfp_mask & __GFP_IO));
+
/*
* The page is mapped into the page tables of one or more
* processes. Try to unmap it here.
_
--
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/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] mm/vmscan.c:shrink_list(): check PageSwapCache() after add_to_swap()
2004-01-28 16:43 [PATCH] mm/vmscan.c:shrink_list(): check PageSwapCache() after add_to_swap() Nikita Danilov
@ 2004-01-28 21:44 ` Andrew Morton
2004-01-30 2:53 ` [BENCHMARKS] 2.6 kbuild results (with add_to_swap patch) Nick Piggin
0 siblings, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2004-01-28 21:44 UTC (permalink / raw)
To: Nikita Danilov; +Cc: linux-mm
Nikita Danilov <Nikita@Namesys.COM> wrote:
>
> Hello,
>
> shrink_list() checks PageSwapCache() before calling add_to_swap(), this
> means that anonymous page that is going to be added to the swap right
> now these checks return false and:
>
> (*) it will be unaccounted for in nr_mapped, and
>
> (*) it won't be written to the swap if gfp_flags include __GFP_IO but
> not __GFP_FS.
>
> (Both will happen only on the next round of scanning.)
OK. Does it make a measurable change in any benchmarks?
> Patch below just moves may_enter_fs initialization down. I am not sure
> about (*nr_mapped) increase though.
nr_mapped seems OK.
--
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/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [BENCHMARKS] 2.6 kbuild results (with add_to_swap patch)
2004-01-28 21:44 ` Andrew Morton
@ 2004-01-30 2:53 ` Nick Piggin
2004-01-30 12:04 ` Rik van Riel
0 siblings, 1 reply; 8+ messages in thread
From: Nick Piggin @ 2004-01-30 2:53 UTC (permalink / raw)
To: Andrew Morton; +Cc: Nikita Danilov, linux-mm
Andrew Morton wrote:
>Nikita Danilov <Nikita@Namesys.COM> wrote:
>
>>Hello,
>>
>>shrink_list() checks PageSwapCache() before calling add_to_swap(), this
>>means that anonymous page that is going to be added to the swap right
>>now these checks return false and:
>>
>> (*) it will be unaccounted for in nr_mapped, and
>>
>> (*) it won't be written to the swap if gfp_flags include __GFP_IO but
>> not __GFP_FS.
>>
>>(Both will happen only on the next round of scanning.)
>>
>
>OK. Does it make a measurable change in any benchmarks?
>
>
Small big significantly better on kbuild when tested on top of the other
two patches (dont-rotate-active-list and my mapped-fair).
With this patch as well, we are now as good or better than 2.4 on
medium and heavy swapping kbuilds and much better than stock 2.6
with light swapping loads (not as good as 2.4 but close).
http://www.kerneltrap.org/~npiggin/vm/3/
--
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/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BENCHMARKS] 2.6 kbuild results (with add_to_swap patch)
2004-01-30 2:53 ` [BENCHMARKS] 2.6 kbuild results (with add_to_swap patch) Nick Piggin
@ 2004-01-30 12:04 ` Rik van Riel
2004-01-31 1:19 ` Nick Piggin
2004-02-04 5:11 ` Nick Piggin
0 siblings, 2 replies; 8+ messages in thread
From: Rik van Riel @ 2004-01-30 12:04 UTC (permalink / raw)
To: Nick Piggin; +Cc: Andrew Morton, Nikita Danilov, linux-mm
On Fri, 30 Jan 2004, Nick Piggin wrote:
> Small big significantly better on kbuild when tested on top of the other
> two patches (dont-rotate-active-list and my mapped-fair).
Where can I grab those ?
> With this patch as well, we are now as good or better than 2.4 on
> medium and heavy swapping kbuilds and much better than stock 2.6
> with light swapping loads (not as good as 2.4 but close).
>
> http://www.kerneltrap.org/~npiggin/vm/3/
Neat! Does it have any side effects to interactive
desktop behaviour ?
--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
--
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/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BENCHMARKS] 2.6 kbuild results (with add_to_swap patch)
2004-01-30 12:04 ` Rik van Riel
@ 2004-01-31 1:19 ` Nick Piggin
2004-01-31 1:29 ` Andrew Morton
2004-02-04 5:11 ` Nick Piggin
1 sibling, 1 reply; 8+ messages in thread
From: Nick Piggin @ 2004-01-31 1:19 UTC (permalink / raw)
To: Rik van Riel; +Cc: Andrew Morton, Nikita Danilov, linux-mm
Rik van Riel wrote:
>On Fri, 30 Jan 2004, Nick Piggin wrote:
>
>
>>Small big significantly better on kbuild when tested on top of the other
>>two patches (dont-rotate-active-list and my mapped-fair).
>>
>
>Where can I grab those ?
>
>
I've put the all here for now.
They are against the latest mm with the RSS patch backed out.
http://kerneltrap.org/~npiggin/vm/
>>With this patch as well, we are now as good or better than 2.4 on
>>medium and heavy swapping kbuilds and much better than stock 2.6
>>with light swapping loads (not as good as 2.4 but close).
>>
>>http://www.kerneltrap.org/~npiggin/vm/3/
>>
>
>Neat! Does it have any side effects to interactive
>desktop behaviour ?
>
>
To be honest I haven't tried them on my desktop. I would guess
they should be fine.
--
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/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BENCHMARKS] 2.6 kbuild results (with add_to_swap patch)
2004-01-31 1:19 ` Nick Piggin
@ 2004-01-31 1:29 ` Andrew Morton
2004-01-31 1:34 ` Nick Piggin
0 siblings, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2004-01-31 1:29 UTC (permalink / raw)
To: Nick Piggin; +Cc: riel, Nikita, linux-mm
Nick Piggin <piggin@cyberone.com.au> wrote:
>
> They are against the latest mm with the RSS patch backed out.
Is the rss patch in mm2 still misbehaving?
--
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/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BENCHMARKS] 2.6 kbuild results (with add_to_swap patch)
2004-01-31 1:29 ` Andrew Morton
@ 2004-01-31 1:34 ` Nick Piggin
0 siblings, 0 replies; 8+ messages in thread
From: Nick Piggin @ 2004-01-31 1:34 UTC (permalink / raw)
To: Andrew Morton; +Cc: riel, Nikita, linux-mm
Andrew Morton wrote:
>Nick Piggin <piggin@cyberone.com.au> wrote:
>
>>They are against the latest mm with the RSS patch backed out.
>>
>
>Is the rss patch in mm2 still misbehaving?
>
>
I haven't had a look yet Andrew, I'll give it a try soon.
Sorry, I actually meant 2.6.2-rc2-mm1.
--
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/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BENCHMARKS] 2.6 kbuild results (with add_to_swap patch)
2004-01-30 12:04 ` Rik van Riel
2004-01-31 1:19 ` Nick Piggin
@ 2004-02-04 5:11 ` Nick Piggin
1 sibling, 0 replies; 8+ messages in thread
From: Nick Piggin @ 2004-02-04 5:11 UTC (permalink / raw)
To: Rik van Riel; +Cc: Andrew Morton, Nikita Danilov, linux-mm
Rik van Riel wrote:
>On Fri, 30 Jan 2004, Nick Piggin wrote:
>
>
>>Small big significantly better on kbuild when tested on top of the other
>>two patches (dont-rotate-active-list and my mapped-fair).
>>
>
>Where can I grab those ?
>
>
>>With this patch as well, we are now as good or better than 2.4 on
>>medium and heavy swapping kbuilds and much better than stock 2.6
>>with light swapping loads (not as good as 2.4 but close).
>>
>>http://www.kerneltrap.org/~npiggin/vm/3/
>>
>
>Neat! Does it have any side effects to interactive
>desktop behaviour ?
>
>
Hi Rik,
I've just tried the latest patchset on my desktop system. Doing
a make -j4 bzImage, hdparm -t /dev/hda in a loop, mozilla, gnome
xterms etc.
Nothing bad is happening, although I'm only just touching swap.
--
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/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-02-04 5:11 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-28 16:43 [PATCH] mm/vmscan.c:shrink_list(): check PageSwapCache() after add_to_swap() Nikita Danilov
2004-01-28 21:44 ` Andrew Morton
2004-01-30 2:53 ` [BENCHMARKS] 2.6 kbuild results (with add_to_swap patch) Nick Piggin
2004-01-30 12:04 ` Rik van Riel
2004-01-31 1:19 ` Nick Piggin
2004-01-31 1:29 ` Andrew Morton
2004-01-31 1:34 ` Nick Piggin
2004-02-04 5:11 ` Nick Piggin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox