* [PATCH] tmpfs: Insert tmpfs cache pages to inactive list at first
@ 2010-05-19 8:44 KOSAKI Motohiro
2010-05-19 18:47 ` Rik van Riel
` (4 more replies)
0 siblings, 5 replies; 15+ messages in thread
From: KOSAKI Motohiro @ 2010-05-19 8:44 UTC (permalink / raw)
To: Shaohua Li, Wu Fengguang, Johannes Weiner, Rik van Riel,
Minchan Kim, Hugh Dickins, LKML, linux-mm, Andrew Morton
Cc: kosaki.motohiro
Shaohua Li reported parallel file copy on tmpfs can lead to
OOM killer. This is regression of caused by commit 9ff473b9a7
(vmscan: evict streaming IO first). Wow, It is 2 years old patch!
Currently, tmpfs file cache is inserted active list at first. It
mean the insertion doesn't only increase numbers of pages in anon LRU,
but also reduce anon scanning ratio. Therefore, vmscan will get totally
confusion. It scan almost only file LRU even though the system have
plenty unused tmpfs pages.
Historically, lru_cache_add_active_anon() was used by two reasons.
1) Intend to priotize shmem page rather than regular file cache.
2) Intend to avoid reclaim priority inversion of used once pages.
But we've lost both motivation because (1) Now we have separate
anon and file LRU list. then, to insert active list doesn't help
such priotize. (2) In past, one pte access bit will cause page
activation. then to insert inactive list with pte access bit mean
higher priority than to insert active list. Its priority inversion
may lead to uninteded lru chun. but it was already solved by commit
645747462 (vmscan: detect mapped file pages used only once).
(Thanks Hannes, you are great!)
Thus, now we can use lru_cache_add_anon() instead.
Reported-by: Shaohua Li <shaohua.li@intel.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Minchan Kim <minchan.kim@gmail.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
---
mm/filemap.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/mm/filemap.c b/mm/filemap.c
index b941996..023ef61 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -452,7 +452,7 @@ int add_to_page_cache_lru(struct page *page, struct address_space *mapping,
if (page_is_file_cache(page))
lru_cache_add_file(page);
else
- lru_cache_add_active_anon(page);
+ lru_cache_add_anon(page);
}
return ret;
}
--
1.6.5.2
--
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:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH] tmpfs: Insert tmpfs cache pages to inactive list at first
2010-05-19 8:44 [PATCH] tmpfs: Insert tmpfs cache pages to inactive list at first KOSAKI Motohiro
@ 2010-05-19 18:47 ` Rik van Riel
2010-05-19 21:51 ` Johannes Weiner
` (3 subsequent siblings)
4 siblings, 0 replies; 15+ messages in thread
From: Rik van Riel @ 2010-05-19 18:47 UTC (permalink / raw)
To: KOSAKI Motohiro
Cc: Shaohua Li, Wu Fengguang, Johannes Weiner, Minchan Kim,
Hugh Dickins, LKML, linux-mm, Andrew Morton
On 05/19/2010 04:44 AM, KOSAKI Motohiro wrote:
> Shaohua Li reported parallel file copy on tmpfs can lead to
> OOM killer. This is regression of caused by commit 9ff473b9a7
> (vmscan: evict streaming IO first). Wow, It is 2 years old patch!
> Thus, now we can use lru_cache_add_anon() instead.
>
> Reported-by: Shaohua Li<shaohua.li@intel.com>
> Cc: Wu Fengguang<fengguang.wu@intel.com>
> Cc: Johannes Weiner<hannes@cmpxchg.org>
> Cc: Rik van Riel<riel@redhat.com>
> Cc: Minchan Kim<minchan.kim@gmail.com>
> Cc: Hugh Dickins<hughd@google.com>
> Signed-off-by: KOSAKI Motohiro<kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: Rik van Riel <riel@redhat.com>
--
All rights reversed
--
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:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] tmpfs: Insert tmpfs cache pages to inactive list at first
2010-05-19 8:44 [PATCH] tmpfs: Insert tmpfs cache pages to inactive list at first KOSAKI Motohiro
2010-05-19 18:47 ` Rik van Riel
@ 2010-05-19 21:51 ` Johannes Weiner
2010-05-19 23:29 ` Minchan Kim
` (2 subsequent siblings)
4 siblings, 0 replies; 15+ messages in thread
From: Johannes Weiner @ 2010-05-19 21:51 UTC (permalink / raw)
To: KOSAKI Motohiro
Cc: Shaohua Li, Wu Fengguang, Rik van Riel, Minchan Kim, Hugh Dickins,
LKML, linux-mm, Andrew Morton
On Wed, May 19, 2010 at 05:44:49PM +0900, KOSAKI Motohiro wrote:
> Shaohua Li reported parallel file copy on tmpfs can lead to
> OOM killer. This is regression of caused by commit 9ff473b9a7
> (vmscan: evict streaming IO first). Wow, It is 2 years old patch!
>
> Currently, tmpfs file cache is inserted active list at first. It
> mean the insertion doesn't only increase numbers of pages in anon LRU,
> but also reduce anon scanning ratio. Therefore, vmscan will get totally
> confusion. It scan almost only file LRU even though the system have
> plenty unused tmpfs pages.
>
> Historically, lru_cache_add_active_anon() was used by two reasons.
> 1) Intend to priotize shmem page rather than regular file cache.
> 2) Intend to avoid reclaim priority inversion of used once pages.
>
> But we've lost both motivation because (1) Now we have separate
> anon and file LRU list. then, to insert active list doesn't help
> such priotize. (2) In past, one pte access bit will cause page
> activation. then to insert inactive list with pte access bit mean
> higher priority than to insert active list. Its priority inversion
> may lead to uninteded lru chun. but it was already solved by commit
> 645747462 (vmscan: detect mapped file pages used only once).
> (Thanks Hannes, you are great!)
>
> Thus, now we can use lru_cache_add_anon() instead.
>
> Reported-by: Shaohua Li <shaohua.li@intel.com>
> Cc: Wu Fengguang <fengguang.wu@intel.com>
> Cc: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Johannes Weiner <hannes@cmpxchg.org>
> Cc: Rik van Riel <riel@redhat.com>
> Cc: Minchan Kim <minchan.kim@gmail.com>
> Cc: Hugh Dickins <hughd@google.com>
> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> ---
> mm/filemap.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/mm/filemap.c b/mm/filemap.c
> index b941996..023ef61 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -452,7 +452,7 @@ int add_to_page_cache_lru(struct page *page, struct address_space *mapping,
> if (page_is_file_cache(page))
> lru_cache_add_file(page);
> else
> - lru_cache_add_active_anon(page);
> + lru_cache_add_anon(page);
Looks like the active_anon and active_file versions have no users
anymore..
--
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:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] tmpfs: Insert tmpfs cache pages to inactive list at first
2010-05-19 8:44 [PATCH] tmpfs: Insert tmpfs cache pages to inactive list at first KOSAKI Motohiro
2010-05-19 18:47 ` Rik van Riel
2010-05-19 21:51 ` Johannes Weiner
@ 2010-05-19 23:29 ` Minchan Kim
2010-05-20 1:00 ` Wu Fengguang
2010-05-21 1:31 ` Hugh Dickins
4 siblings, 0 replies; 15+ messages in thread
From: Minchan Kim @ 2010-05-19 23:29 UTC (permalink / raw)
To: KOSAKI Motohiro
Cc: Shaohua Li, Wu Fengguang, Johannes Weiner, Rik van Riel,
Hugh Dickins, LKML, linux-mm, Andrew Morton
On Wed, May 19, 2010 at 5:44 PM, KOSAKI Motohiro
<kosaki.motohiro@jp.fujitsu.com> wrote:
> Shaohua Li reported parallel file copy on tmpfs can lead to
> OOM killer. This is regression of caused by commit 9ff473b9a7
> (vmscan: evict streaming IO first). Wow, It is 2 years old patch!
>
> Currently, tmpfs file cache is inserted active list at first. It
> mean the insertion doesn't only increase numbers of pages in anon LRU,
> but also reduce anon scanning ratio. Therefore, vmscan will get totally
> confusion. It scan almost only file LRU even though the system have
> plenty unused tmpfs pages.
>
> Historically, lru_cache_add_active_anon() was used by two reasons.
> 1) Intend to priotize shmem page rather than regular file cache.
> 2) Intend to avoid reclaim priority inversion of used once pages.
>
> But we've lost both motivation because (1) Now we have separate
> anon and file LRU list. then, to insert active list doesn't help
> such priotize. (2) In past, one pte access bit will cause page
> activation. then to insert inactive list with pte access bit mean
> higher priority than to insert active list. Its priority inversion
> may lead to uninteded lru chun. but it was already solved by commit
> 645747462 (vmscan: detect mapped file pages used only once).
> (Thanks Hannes, you are great!)
>
> Thus, now we can use lru_cache_add_anon() instead.
>
> Reported-by: Shaohua Li <shaohua.li@intel.com>
> Cc: Wu Fengguang <fengguang.wu@intel.com>
> Cc: Johannes Weiner <hannes@cmpxchg.org>
> Cc: Rik van Riel <riel@redhat.com>
> Cc: Minchan Kim <minchan.kim@gmail.com>
> Cc: Hugh Dickins <hughd@google.com>
> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
The description itself is valuable. :)
Thanks, Kosaki.
--
Kind regards,
Minchan Kim
--
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:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] tmpfs: Insert tmpfs cache pages to inactive list at first
2010-05-19 8:44 [PATCH] tmpfs: Insert tmpfs cache pages to inactive list at first KOSAKI Motohiro
` (2 preceding siblings ...)
2010-05-19 23:29 ` Minchan Kim
@ 2010-05-20 1:00 ` Wu Fengguang
2010-05-21 0:36 ` KOSAKI Motohiro
2010-05-21 1:31 ` Hugh Dickins
4 siblings, 1 reply; 15+ messages in thread
From: Wu Fengguang @ 2010-05-20 1:00 UTC (permalink / raw)
To: KOSAKI Motohiro
Cc: Li, Shaohua, Johannes Weiner, Rik van Riel, Minchan Kim,
Hugh Dickins, LKML, linux-mm, Andrew Morton
Reviewed-by: Wu Fengguang <fengguang.wu@intel.com>
The preceding comment "they need to go on the active_anon lru below"
also needs update.
Thanks,
Fengguang
--
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:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] tmpfs: Insert tmpfs cache pages to inactive list at first
2010-05-20 1:00 ` Wu Fengguang
@ 2010-05-21 0:36 ` KOSAKI Motohiro
2010-05-21 18:57 ` Andrew Morton
0 siblings, 1 reply; 15+ messages in thread
From: KOSAKI Motohiro @ 2010-05-21 0:36 UTC (permalink / raw)
To: Wu Fengguang
Cc: kosaki.motohiro, Li, Shaohua, Johannes Weiner, Rik van Riel,
Minchan Kim, Hugh Dickins, LKML, linux-mm, Andrew Morton
> Reviewed-by: Wu Fengguang <fengguang.wu@intel.com>
>
> The preceding comment "they need to go on the active_anon lru below"
> also needs update.
>
Thanks. incremental patch is here.
---
include/linux/swap.h | 10 ----------
mm/filemap.c | 2 +-
2 files changed, 1 insertions(+), 11 deletions(-)
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 18420a9..4bfd932 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -224,21 +224,11 @@ static inline void lru_cache_add_anon(struct page *page)
__lru_cache_add(page, LRU_INACTIVE_ANON);
}
-static inline void lru_cache_add_active_anon(struct page *page)
-{
- __lru_cache_add(page, LRU_ACTIVE_ANON);
-}
-
static inline void lru_cache_add_file(struct page *page)
{
__lru_cache_add(page, LRU_INACTIVE_FILE);
}
-static inline void lru_cache_add_active_file(struct page *page)
-{
- __lru_cache_add(page, LRU_ACTIVE_FILE);
-}
-
/* LRU Isolation modes. */
#define ISOLATE_INACTIVE 0 /* Isolate inactive pages. */
#define ISOLATE_ACTIVE 1 /* Isolate active pages. */
diff --git a/mm/filemap.c b/mm/filemap.c
index 023ef61..a57931a 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -441,7 +441,7 @@ int add_to_page_cache_lru(struct page *page, struct address_space *mapping,
/*
* Splice_read and readahead add shmem/tmpfs pages into the page cache
* before shmem_readpage has a chance to mark them as SwapBacked: they
- * need to go on the active_anon lru below, and mem_cgroup_cache_charge
+ * need to go on the anon lru below, and mem_cgroup_cache_charge
* (called in add_to_page_cache) needs to know where they're going too.
*/
if (mapping_cap_swap_backed(mapping))
--
1.6.5.2
--
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:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH] tmpfs: Insert tmpfs cache pages to inactive list at first
2010-05-19 8:44 [PATCH] tmpfs: Insert tmpfs cache pages to inactive list at first KOSAKI Motohiro
` (3 preceding siblings ...)
2010-05-20 1:00 ` Wu Fengguang
@ 2010-05-21 1:31 ` Hugh Dickins
2010-05-21 1:43 ` KOSAKI Motohiro
2010-05-21 2:00 ` Rik van Riel
4 siblings, 2 replies; 15+ messages in thread
From: Hugh Dickins @ 2010-05-21 1:31 UTC (permalink / raw)
To: KOSAKI Motohiro
Cc: Shaohua Li, Wu Fengguang, Johannes Weiner, Rik van Riel,
Minchan Kim, LKML, linux-mm, Andrew Morton
On Wed, 19 May 2010, KOSAKI Motohiro wrote:
> Shaohua Li reported parallel file copy on tmpfs can lead to
> OOM killer. This is regression of caused by commit 9ff473b9a7
> (vmscan: evict streaming IO first). Wow, It is 2 years old patch!
>
> Currently, tmpfs file cache is inserted active list at first. It
> mean the insertion doesn't only increase numbers of pages in anon LRU,
> but also reduce anon scanning ratio. Therefore, vmscan will get totally
> confusion. It scan almost only file LRU even though the system have
> plenty unused tmpfs pages.
>
> Historically, lru_cache_add_active_anon() was used by two reasons.
> 1) Intend to priotize shmem page rather than regular file cache.
> 2) Intend to avoid reclaim priority inversion of used once pages.
>
> But we've lost both motivation because (1) Now we have separate
> anon and file LRU list. then, to insert active list doesn't help
> such priotize. (2) In past, one pte access bit will cause page
> activation. then to insert inactive list with pte access bit mean
> higher priority than to insert active list. Its priority inversion
> may lead to uninteded lru chun. but it was already solved by commit
> 645747462 (vmscan: detect mapped file pages used only once).
> (Thanks Hannes, you are great!)
>
> Thus, now we can use lru_cache_add_anon() instead.
>
> Reported-by: Shaohua Li <shaohua.li@intel.com>
> Cc: Wu Fengguang <fengguang.wu@intel.com>
> Cc: Johannes Weiner <hannes@cmpxchg.org>
> Cc: Rik van Riel <riel@redhat.com>
> Cc: Minchan Kim <minchan.kim@gmail.com>
> Cc: Hugh Dickins <hughd@google.com>
> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Hugh Dickins <hughd@google.com>
Thanks - though I don't quite agree with your description: I can't
see why the lru_cache_add_active_anon() was ever justified - that
"active" came in along with the separate anon and file LRU lists.
Hugh
--
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:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] tmpfs: Insert tmpfs cache pages to inactive list at first
2010-05-21 1:31 ` Hugh Dickins
@ 2010-05-21 1:43 ` KOSAKI Motohiro
2010-05-21 2:10 ` Hugh Dickins
2010-05-21 2:00 ` Rik van Riel
1 sibling, 1 reply; 15+ messages in thread
From: KOSAKI Motohiro @ 2010-05-21 1:43 UTC (permalink / raw)
To: Hugh Dickins
Cc: kosaki.motohiro, Shaohua Li, Wu Fengguang, Johannes Weiner,
Rik van Riel, Minchan Kim, LKML, linux-mm, Andrew Morton
Hi
> Acked-by: Hugh Dickins <hughd@google.com>
>
> Thanks - though I don't quite agree with your description: I can't
> see why the lru_cache_add_active_anon() was ever justified - that
> "active" came in along with the separate anon and file LRU lists.
If you have any worry, can you please share it? I'll test such workload
and fix the issue if necessary. You are expert than me in this area.
--
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:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] tmpfs: Insert tmpfs cache pages to inactive list at first
2010-05-21 1:31 ` Hugh Dickins
2010-05-21 1:43 ` KOSAKI Motohiro
@ 2010-05-21 2:00 ` Rik van Riel
1 sibling, 0 replies; 15+ messages in thread
From: Rik van Riel @ 2010-05-21 2:00 UTC (permalink / raw)
To: Hugh Dickins
Cc: KOSAKI Motohiro, Shaohua Li, Wu Fengguang, Johannes Weiner,
Minchan Kim, LKML, linux-mm, Andrew Morton
On 05/20/2010 09:31 PM, Hugh Dickins wrote:
> Acked-by: Hugh Dickins<hughd@google.com>
>
> Thanks - though I don't quite agree with your description: I can't
> see why the lru_cache_add_active_anon() was ever justified - that
> "active" came in along with the separate anon and file LRU lists.
I guess I kind of expected that function to be used by
anonymous pages, when I wrote it. Except we use a
different variant from do_anonymous_page :)
--
All rights reversed
--
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:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] tmpfs: Insert tmpfs cache pages to inactive list at first
2010-05-21 1:43 ` KOSAKI Motohiro
@ 2010-05-21 2:10 ` Hugh Dickins
2010-05-21 2:18 ` KOSAKI Motohiro
2010-05-21 16:25 ` Henrique de Moraes Holschuh
0 siblings, 2 replies; 15+ messages in thread
From: Hugh Dickins @ 2010-05-21 2:10 UTC (permalink / raw)
To: KOSAKI Motohiro
Cc: Shaohua Li, Wu Fengguang, Johannes Weiner, Rik van Riel,
Minchan Kim, LKML, linux-mm, Andrew Morton
On Fri, 21 May 2010, KOSAKI Motohiro wrote:
>
> > Acked-by: Hugh Dickins <hughd@google.com>
> >
> > Thanks - though I don't quite agree with your description: I can't
> > see why the lru_cache_add_active_anon() was ever justified - that
> > "active" came in along with the separate anon and file LRU lists.
>
> If you have any worry, can you please share it? I'll test such workload
> and fix the issue if necessary. You are expert than me in this area.
?? I've acked the patch: my worry is only with the detail of your
comments on the history - in my view it was always wrong to put on
the active LRU there, and I'm glad that you have now fixed it.
If you really want to test some workload on 2.6.28 to see if it too
works better with your fix, I won't stop you - but I'd much prefer
you to be applying your mind to 2.6.35 and 2.6.36!
Hugh
--
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:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] tmpfs: Insert tmpfs cache pages to inactive list at first
2010-05-21 2:10 ` Hugh Dickins
@ 2010-05-21 2:18 ` KOSAKI Motohiro
2010-05-21 16:25 ` Henrique de Moraes Holschuh
1 sibling, 0 replies; 15+ messages in thread
From: KOSAKI Motohiro @ 2010-05-21 2:18 UTC (permalink / raw)
To: Hugh Dickins
Cc: kosaki.motohiro, Shaohua Li, Wu Fengguang, Johannes Weiner,
Rik van Riel, Minchan Kim, LKML, linux-mm, Andrew Morton
> On Fri, 21 May 2010, KOSAKI Motohiro wrote:
> >
> > > Acked-by: Hugh Dickins <hughd@google.com>
> > >
> > > Thanks - though I don't quite agree with your description: I can't
> > > see why the lru_cache_add_active_anon() was ever justified - that
> > > "active" came in along with the separate anon and file LRU lists.
> >
> > If you have any worry, can you please share it? I'll test such workload
> > and fix the issue if necessary. You are expert than me in this area.
>
> ?? I've acked the patch: my worry is only with the detail of your
> comments on the history - in my view it was always wrong to put on
> the active LRU there, and I'm glad that you have now fixed it.
Oops, I misparsed your text. very sorry. I thought you said opposite ;)
Thanks.
> If you really want to test some workload on 2.6.28 to see if it too
> works better with your fix, I won't stop you - but I'd much prefer
> you to be applying your mind to 2.6.35 and 2.6.36!
>
> Hugh
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
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:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] tmpfs: Insert tmpfs cache pages to inactive list at first
2010-05-21 2:10 ` Hugh Dickins
2010-05-21 2:18 ` KOSAKI Motohiro
@ 2010-05-21 16:25 ` Henrique de Moraes Holschuh
1 sibling, 0 replies; 15+ messages in thread
From: Henrique de Moraes Holschuh @ 2010-05-21 16:25 UTC (permalink / raw)
To: Hugh Dickins
Cc: KOSAKI Motohiro, Shaohua Li, Wu Fengguang, Johannes Weiner,
Rik van Riel, Minchan Kim, LKML, linux-mm, Andrew Morton
On Thu, 20 May 2010, Hugh Dickins wrote:
> If you really want to test some workload on 2.6.28 to see if it too
> works better with your fix, I won't stop you - but I'd much prefer
> you to be applying your mind to 2.6.35 and 2.6.36!
And sending it to -stable (after merged in mainline) if it should be on
2.6.32/33/34, please.
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
--
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:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] tmpfs: Insert tmpfs cache pages to inactive list at first
2010-05-21 0:36 ` KOSAKI Motohiro
@ 2010-05-21 18:57 ` Andrew Morton
2010-05-22 0:04 ` KOSAKI Motohiro
0 siblings, 1 reply; 15+ messages in thread
From: Andrew Morton @ 2010-05-21 18:57 UTC (permalink / raw)
To: KOSAKI Motohiro
Cc: Wu Fengguang, Li, Shaohua, Johannes Weiner, Rik van Riel,
Minchan Kim, Hugh Dickins, LKML, linux-mm
On Fri, 21 May 2010 09:36:50 +0900 (JST)
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> > Reviewed-by: Wu Fengguang <fengguang.wu@intel.com>
> >
> > The preceding comment "they need to go on the active_anon lru below"
> > also needs update.
> >
>
> Thanks. incremental patch is here.
>
>
> ---
> include/linux/swap.h | 10 ----------
> mm/filemap.c | 2 +-
> 2 files changed, 1 insertions(+), 11 deletions(-)
>
> diff --git a/include/linux/swap.h b/include/linux/swap.h
> index 18420a9..4bfd932 100644
> --- a/include/linux/swap.h
> +++ b/include/linux/swap.h
> @@ -224,21 +224,11 @@ static inline void lru_cache_add_anon(struct page *page)
> __lru_cache_add(page, LRU_INACTIVE_ANON);
> }
>
> -static inline void lru_cache_add_active_anon(struct page *page)
> -{
> - __lru_cache_add(page, LRU_ACTIVE_ANON);
> -}
> -
> static inline void lru_cache_add_file(struct page *page)
> {
> __lru_cache_add(page, LRU_INACTIVE_FILE);
> }
>
> -static inline void lru_cache_add_active_file(struct page *page)
> -{
> - __lru_cache_add(page, LRU_ACTIVE_FILE);
> -}
Did you intend to remove these two functions?
They do appear to be unused now, but they still make sense and might be
used in the future, perhaps. It's OK to remove them, but I'm wondering
if it was deliberately included in this patch?
> /* LRU Isolation modes. */
> #define ISOLATE_INACTIVE 0 /* Isolate inactive pages. */
> #define ISOLATE_ACTIVE 1 /* Isolate active pages. */
> diff --git a/mm/filemap.c b/mm/filemap.c
> index 023ef61..a57931a 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -441,7 +441,7 @@ int add_to_page_cache_lru(struct page *page, struct address_space *mapping,
> /*
> * Splice_read and readahead add shmem/tmpfs pages into the page cache
> * before shmem_readpage has a chance to mark them as SwapBacked: they
> - * need to go on the active_anon lru below, and mem_cgroup_cache_charge
> + * need to go on the anon lru below, and mem_cgroup_cache_charge
> * (called in add_to_page_cache) needs to know where they're going too.
> */
> if (mapping_cap_swap_backed(mapping))
> --
> 1.6.5.2
>
>
>
>
--
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:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] tmpfs: Insert tmpfs cache pages to inactive list at first
2010-05-22 0:04 ` KOSAKI Motohiro
@ 2010-05-21 21:32 ` Andrew Morton
0 siblings, 0 replies; 15+ messages in thread
From: Andrew Morton @ 2010-05-21 21:32 UTC (permalink / raw)
To: KOSAKI Motohiro
Cc: Wu Fengguang, Li, Shaohua, Johannes Weiner, Rik van Riel,
Minchan Kim, Hugh Dickins, LKML, linux-mm
On Sat, 22 May 2010 09:04:30 +0900 (JST) KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> > > -static inline void lru_cache_add_active_anon(struct page *page)
> > > -{
> > > - __lru_cache_add(page, LRU_ACTIVE_ANON);
> > > -}
> > > -
> > > static inline void lru_cache_add_file(struct page *page)
> > > {
> > > __lru_cache_add(page, LRU_INACTIVE_FILE);
> > > }
> > >
> > > -static inline void lru_cache_add_active_file(struct page *page)
> > > -{
> > > - __lru_cache_add(page, LRU_ACTIVE_FILE);
> > > -}
> >
> > Did you intend to remove these two functions?
>
> This is for applying Hannes's commnet.
>
> > They do appear to be unused now, but they still make sense and might be
> > used in the future, perhaps.
>
> Personally, I don't like the strategy that anyone without me might
> use this function in the future. because It often never come.
>
> > It's OK to remove them, but I'm wondering
> > if it was deliberately included in this patch?
>
> Makes sense.
> OK, please drop current patch at once. I'll post V2.
Is OK, let's keep the change. I just wanted to check that it wasn't
made accidentally.
--
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:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] tmpfs: Insert tmpfs cache pages to inactive list at first
2010-05-21 18:57 ` Andrew Morton
@ 2010-05-22 0:04 ` KOSAKI Motohiro
2010-05-21 21:32 ` Andrew Morton
0 siblings, 1 reply; 15+ messages in thread
From: KOSAKI Motohiro @ 2010-05-22 0:04 UTC (permalink / raw)
To: Andrew Morton
Cc: kosaki.motohiro, Wu Fengguang, Li, Shaohua, Johannes Weiner,
Rik van Riel, Minchan Kim, Hugh Dickins, LKML, linux-mm
> > -static inline void lru_cache_add_active_anon(struct page *page)
> > -{
> > - __lru_cache_add(page, LRU_ACTIVE_ANON);
> > -}
> > -
> > static inline void lru_cache_add_file(struct page *page)
> > {
> > __lru_cache_add(page, LRU_INACTIVE_FILE);
> > }
> >
> > -static inline void lru_cache_add_active_file(struct page *page)
> > -{
> > - __lru_cache_add(page, LRU_ACTIVE_FILE);
> > -}
>
> Did you intend to remove these two functions?
This is for applying Hannes's commnet.
> They do appear to be unused now, but they still make sense and might be
> used in the future, perhaps.
Personally, I don't like the strategy that anyone without me might
use this function in the future. because It often never come.
> It's OK to remove them, but I'm wondering
> if it was deliberately included in this patch?
Makes sense.
OK, please drop current patch at once. I'll post V2.
--
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:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2010-05-22 0:34 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-19 8:44 [PATCH] tmpfs: Insert tmpfs cache pages to inactive list at first KOSAKI Motohiro
2010-05-19 18:47 ` Rik van Riel
2010-05-19 21:51 ` Johannes Weiner
2010-05-19 23:29 ` Minchan Kim
2010-05-20 1:00 ` Wu Fengguang
2010-05-21 0:36 ` KOSAKI Motohiro
2010-05-21 18:57 ` Andrew Morton
2010-05-22 0:04 ` KOSAKI Motohiro
2010-05-21 21:32 ` Andrew Morton
2010-05-21 1:31 ` Hugh Dickins
2010-05-21 1:43 ` KOSAKI Motohiro
2010-05-21 2:10 ` Hugh Dickins
2010-05-21 2:18 ` KOSAKI Motohiro
2010-05-21 16:25 ` Henrique de Moraes Holschuh
2010-05-21 2:00 ` Rik van Riel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).