* sync_mm_rss() issues
@ 2010-03-08 13:59 ` David Howells
0 siblings, 0 replies; 14+ messages in thread
From: David Howells @ 2010-03-08 13:59 UTC (permalink / raw)
To: kamezawa.hiroyu, torvalds; +Cc: dhowells, linux-kernel, linux-mm
There are a couple of issues with sync_mm_rss(), as added by patch:
commit 34e55232e59f7b19050267a05ff1226e5cd122a5
Author: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Date: Fri Mar 5 13:41:40 2010 -0800
Subject: mm: avoid false sharing of mm_counter
(1) You haven't implemented it for NOMMU mode. What's the right way to do
this? Just give an empty function?
(2) linux/mm.h should carry the empty function as an inline when
CONFIG_SPLIT_RSS_COUNTING=n, rather than it being defined as an empty
function in mm/memory.c.
David
^ permalink raw reply [flat|nested] 14+ messages in thread* sync_mm_rss() issues @ 2010-03-08 13:59 ` David Howells 0 siblings, 0 replies; 14+ messages in thread From: David Howells @ 2010-03-08 13:59 UTC (permalink / raw) To: kamezawa.hiroyu, torvalds; +Cc: dhowells, linux-kernel, linux-mm There are a couple of issues with sync_mm_rss(), as added by patch: commit 34e55232e59f7b19050267a05ff1226e5cd122a5 Author: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Date: Fri Mar 5 13:41:40 2010 -0800 Subject: mm: avoid false sharing of mm_counter (1) You haven't implemented it for NOMMU mode. What's the right way to do this? Just give an empty function? (2) linux/mm.h should carry the empty function as an inline when CONFIG_SPLIT_RSS_COUNTING=n, rather than it being defined as an empty function in mm/memory.c. David -- 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] 14+ messages in thread
* Re: sync_mm_rss() issues 2010-03-08 13:59 ` David Howells @ 2010-03-08 23:50 ` KAMEZAWA Hiroyuki -1 siblings, 0 replies; 14+ messages in thread From: KAMEZAWA Hiroyuki @ 2010-03-08 23:50 UTC (permalink / raw) To: David Howells; +Cc: torvalds, linux-kernel, linux-mm On Mon, 08 Mar 2010 13:59:56 +0000 David Howells <dhowells@redhat.com> wrote: > > There are a couple of issues with sync_mm_rss(), as added by patch: > > commit 34e55232e59f7b19050267a05ff1226e5cd122a5 > Author: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> > Date: Fri Mar 5 13:41:40 2010 -0800 > Subject: mm: avoid false sharing of mm_counter > > (1) You haven't implemented it for NOMMU mode. What's the right way to do > this? Just give an empty function? > Ah, sorry. I'll prepare empty function immediately. But I have no NOMMU enviroment... > (2) linux/mm.h should carry the empty function as an inline when > CONFIG_SPLIT_RSS_COUNTING=n, rather than it being defined as an empty > function in mm/memory.c. > ok. please wait.. Sorry, -Kame ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: sync_mm_rss() issues @ 2010-03-08 23:50 ` KAMEZAWA Hiroyuki 0 siblings, 0 replies; 14+ messages in thread From: KAMEZAWA Hiroyuki @ 2010-03-08 23:50 UTC (permalink / raw) To: David Howells; +Cc: torvalds, linux-kernel, linux-mm On Mon, 08 Mar 2010 13:59:56 +0000 David Howells <dhowells@redhat.com> wrote: > > There are a couple of issues with sync_mm_rss(), as added by patch: > > commit 34e55232e59f7b19050267a05ff1226e5cd122a5 > Author: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> > Date: Fri Mar 5 13:41:40 2010 -0800 > Subject: mm: avoid false sharing of mm_counter > > (1) You haven't implemented it for NOMMU mode. What's the right way to do > this? Just give an empty function? > Ah, sorry. I'll prepare empty function immediately. But I have no NOMMU enviroment... > (2) linux/mm.h should carry the empty function as an inline when > CONFIG_SPLIT_RSS_COUNTING=n, rather than it being defined as an empty > function in mm/memory.c. > ok. please wait.. Sorry, -Kame -- 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] 14+ messages in thread
* [BUGFIX][PATCH] fix sync_mm_rss in nommu (Was Re: sync_mm_rss() issues 2010-03-08 13:59 ` David Howells @ 2010-03-09 0:58 ` KAMEZAWA Hiroyuki -1 siblings, 0 replies; 14+ messages in thread From: KAMEZAWA Hiroyuki @ 2010-03-09 0:58 UTC (permalink / raw) To: David Howells; +Cc: torvalds, linux-kernel, linux-mm David-san, could you check this ? == From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Fix breakage in NOMMU build commit 34e55232e59f7b19050267a05ff1226e5cd122a5 added sync_mm_rss() for syncing loosely accounted rss counters. It's for CONFIG_MMU but sync_mm_rss is called even in NOMMU enviroment (kerne/exit.c, fs/exec.c). Above commit doesn't handle it well. This patch changes SPLIT_RSS_COUNTING depends on SPLIT_PTLOCKS && CONFIG_MMU And for avoid unnecessary function calls, sync_mm_rss changed to be inlined noop function in header file. Reported-by: David Howells <dhowells@redhat.com> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> --- include/linux/mm.h | 6 ++++++ include/linux/mm_types.h | 2 +- mm/memory.c | 3 --- 3 files changed, 7 insertions(+), 4 deletions(-) Index: mmotm-2.6.33-Mar5/include/linux/mm.h =================================================================== --- mmotm-2.6.33-Mar5.orig/include/linux/mm.h +++ mmotm-2.6.33-Mar5/include/linux/mm.h @@ -974,7 +974,13 @@ static inline void setmax_mm_hiwater_rss *maxrss = hiwater_rss; } +#if defined(SPLIT_RSS_COUNTING) void sync_mm_rss(struct task_struct *task, struct mm_struct *mm); +#else +static inline void sync_mm_rss(struct task_struct *task, struct mm_struct *mm) +{ +} +#endif /* * A callback you can register to apply pressure to ageable caches. Index: mmotm-2.6.33-Mar5/mm/memory.c =================================================================== --- mmotm-2.6.33-Mar5.orig/mm/memory.c +++ mmotm-2.6.33-Mar5/mm/memory.c @@ -190,9 +190,6 @@ static void check_sync_rss_stat(struct t { } -void sync_mm_rss(struct task_struct *task, struct mm_struct *mm) -{ -} #endif /* Index: mmotm-2.6.33-Mar5/include/linux/mm_types.h =================================================================== --- mmotm-2.6.33-Mar5.orig/include/linux/mm_types.h +++ mmotm-2.6.33-Mar5/include/linux/mm_types.h @@ -203,7 +203,7 @@ enum { NR_MM_COUNTERS }; -#if USE_SPLIT_PTLOCKS +#if USE_SPLIT_PTLOCKS && defined(CONFIG_MMU) #define SPLIT_RSS_COUNTING struct mm_rss_stat { atomic_long_t count[NR_MM_COUNTERS]; ^ permalink raw reply [flat|nested] 14+ messages in thread
* [BUGFIX][PATCH] fix sync_mm_rss in nommu (Was Re: sync_mm_rss() issues @ 2010-03-09 0:58 ` KAMEZAWA Hiroyuki 0 siblings, 0 replies; 14+ messages in thread From: KAMEZAWA Hiroyuki @ 2010-03-09 0:58 UTC (permalink / raw) To: David Howells; +Cc: torvalds, linux-kernel, linux-mm David-san, could you check this ? == From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Fix breakage in NOMMU build commit 34e55232e59f7b19050267a05ff1226e5cd122a5 added sync_mm_rss() for syncing loosely accounted rss counters. It's for CONFIG_MMU but sync_mm_rss is called even in NOMMU enviroment (kerne/exit.c, fs/exec.c). Above commit doesn't handle it well. This patch changes SPLIT_RSS_COUNTING depends on SPLIT_PTLOCKS && CONFIG_MMU And for avoid unnecessary function calls, sync_mm_rss changed to be inlined noop function in header file. Reported-by: David Howells <dhowells@redhat.com> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> --- include/linux/mm.h | 6 ++++++ include/linux/mm_types.h | 2 +- mm/memory.c | 3 --- 3 files changed, 7 insertions(+), 4 deletions(-) Index: mmotm-2.6.33-Mar5/include/linux/mm.h =================================================================== --- mmotm-2.6.33-Mar5.orig/include/linux/mm.h +++ mmotm-2.6.33-Mar5/include/linux/mm.h @@ -974,7 +974,13 @@ static inline void setmax_mm_hiwater_rss *maxrss = hiwater_rss; } +#if defined(SPLIT_RSS_COUNTING) void sync_mm_rss(struct task_struct *task, struct mm_struct *mm); +#else +static inline void sync_mm_rss(struct task_struct *task, struct mm_struct *mm) +{ +} +#endif /* * A callback you can register to apply pressure to ageable caches. Index: mmotm-2.6.33-Mar5/mm/memory.c =================================================================== --- mmotm-2.6.33-Mar5.orig/mm/memory.c +++ mmotm-2.6.33-Mar5/mm/memory.c @@ -190,9 +190,6 @@ static void check_sync_rss_stat(struct t { } -void sync_mm_rss(struct task_struct *task, struct mm_struct *mm) -{ -} #endif /* Index: mmotm-2.6.33-Mar5/include/linux/mm_types.h =================================================================== --- mmotm-2.6.33-Mar5.orig/include/linux/mm_types.h +++ mmotm-2.6.33-Mar5/include/linux/mm_types.h @@ -203,7 +203,7 @@ enum { NR_MM_COUNTERS }; -#if USE_SPLIT_PTLOCKS +#if USE_SPLIT_PTLOCKS && defined(CONFIG_MMU) #define SPLIT_RSS_COUNTING struct mm_rss_stat { atomic_long_t count[NR_MM_COUNTERS]; -- 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] 14+ messages in thread
* Re: [BUGFIX][PATCH] fix sync_mm_rss in nommu (Was Re: sync_mm_rss() issues 2010-03-09 0:58 ` KAMEZAWA Hiroyuki @ 2010-03-09 2:33 ` Mike Frysinger -1 siblings, 0 replies; 14+ messages in thread From: Mike Frysinger @ 2010-03-09 2:33 UTC (permalink / raw) To: KAMEZAWA Hiroyuki; +Cc: David Howells, torvalds, linux-kernel, linux-mm On Mon, Mar 8, 2010 at 19:58, KAMEZAWA Hiroyuki wrote: > David-san, could you check this ? > == > From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> > > Fix breakage in NOMMU build > > commit 34e55232e59f7b19050267a05ff1226e5cd122a5 added sync_mm_rss() > for syncing loosely accounted rss counters. It's for CONFIG_MMU but > sync_mm_rss is called even in NOMMU enviroment (kerne/exit.c, fs/exec.c). > Above commit doesn't handle it well. > > This patch changes > SPLIT_RSS_COUNTING depends on SPLIT_PTLOCKS && CONFIG_MMU > > And for avoid unnecessary function calls, sync_mm_rss changed to be inlined > noop function in header file. fixes Blackfin systems ... Signed-off-by: Mike Frysinger <vapier@gentoo.org> -mike ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [BUGFIX][PATCH] fix sync_mm_rss in nommu (Was Re: sync_mm_rss() issues @ 2010-03-09 2:33 ` Mike Frysinger 0 siblings, 0 replies; 14+ messages in thread From: Mike Frysinger @ 2010-03-09 2:33 UTC (permalink / raw) To: KAMEZAWA Hiroyuki; +Cc: David Howells, torvalds, linux-kernel, linux-mm On Mon, Mar 8, 2010 at 19:58, KAMEZAWA Hiroyuki wrote: > David-san, could you check this ? > == > From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> > > Fix breakage in NOMMU build > > commit 34e55232e59f7b19050267a05ff1226e5cd122a5 added sync_mm_rss() > for syncing loosely accounted rss counters. It's for CONFIG_MMU but > sync_mm_rss is called even in NOMMU enviroment (kerne/exit.c, fs/exec.c). > Above commit doesn't handle it well. > > This patch changes > SPLIT_RSS_COUNTING depends on SPLIT_PTLOCKS && CONFIG_MMU > > And for avoid unnecessary function calls, sync_mm_rss changed to be inlined > noop function in header file. fixes Blackfin systems ... Signed-off-by: Mike Frysinger <vapier@gentoo.org> -mike -- 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] 14+ messages in thread
* Re: [BUGFIX][PATCH] fix sync_mm_rss in nommu (Was Re: sync_mm_rss() issues 2010-03-09 2:33 ` Mike Frysinger @ 2010-03-09 11:49 ` Michal Simek -1 siblings, 0 replies; 14+ messages in thread From: Michal Simek @ 2010-03-09 11:49 UTC (permalink / raw) To: Mike Frysinger Cc: KAMEZAWA Hiroyuki, David Howells, torvalds, linux-kernel, linux-mm Mike Frysinger wrote: > On Mon, Mar 8, 2010 at 19:58, KAMEZAWA Hiroyuki wrote: >> David-san, could you check this ? >> == >> From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> >> >> Fix breakage in NOMMU build >> >> commit 34e55232e59f7b19050267a05ff1226e5cd122a5 added sync_mm_rss() >> for syncing loosely accounted rss counters. It's for CONFIG_MMU but >> sync_mm_rss is called even in NOMMU enviroment (kerne/exit.c, fs/exec.c). >> Above commit doesn't handle it well. >> >> This patch changes >> SPLIT_RSS_COUNTING depends on SPLIT_PTLOCKS && CONFIG_MMU >> >> And for avoid unnecessary function calls, sync_mm_rss changed to be inlined >> noop function in header file. > > fixes Blackfin systems ... > > Signed-off-by: Mike Frysinger <vapier@gentoo.org> fixes Microblaze noMMU systems too. Signed-off-by: Michal Simek <monstr@monstr.eu> You can check Microblaze noMMU system via my site http://www.monstr.eu/wiki/doku.php?id=log:log Will be good to add your patches to linux-next before Linus tree. Michal > -mike > -- > 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/ -- Michal Simek, Ing. (M.Eng) PetaLogix - Linux Solutions for a Reconfigurable World w: www.petalogix.com p: +61-7-30090663,+42-0-721842854 f: +61-7-30090663 ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [BUGFIX][PATCH] fix sync_mm_rss in nommu (Was Re: sync_mm_rss() issues @ 2010-03-09 11:49 ` Michal Simek 0 siblings, 0 replies; 14+ messages in thread From: Michal Simek @ 2010-03-09 11:49 UTC (permalink / raw) To: Mike Frysinger Cc: KAMEZAWA Hiroyuki, David Howells, torvalds, linux-kernel, linux-mm Mike Frysinger wrote: > On Mon, Mar 8, 2010 at 19:58, KAMEZAWA Hiroyuki wrote: >> David-san, could you check this ? >> == >> From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> >> >> Fix breakage in NOMMU build >> >> commit 34e55232e59f7b19050267a05ff1226e5cd122a5 added sync_mm_rss() >> for syncing loosely accounted rss counters. It's for CONFIG_MMU but >> sync_mm_rss is called even in NOMMU enviroment (kerne/exit.c, fs/exec.c). >> Above commit doesn't handle it well. >> >> This patch changes >> SPLIT_RSS_COUNTING depends on SPLIT_PTLOCKS && CONFIG_MMU >> >> And for avoid unnecessary function calls, sync_mm_rss changed to be inlined >> noop function in header file. > > fixes Blackfin systems ... > > Signed-off-by: Mike Frysinger <vapier@gentoo.org> fixes Microblaze noMMU systems too. Signed-off-by: Michal Simek <monstr@monstr.eu> You can check Microblaze noMMU system via my site http://www.monstr.eu/wiki/doku.php?id=log:log Will be good to add your patches to linux-next before Linus tree. Michal > -mike > -- > 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/ -- Michal Simek, Ing. (M.Eng) PetaLogix - Linux Solutions for a Reconfigurable World w: www.petalogix.com p: +61-7-30090663,+42-0-721842854 f: +61-7-30090663 -- 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] 14+ messages in thread
* Re: [BUGFIX][PATCH] fix sync_mm_rss in nommu (Was Re: sync_mm_rss() issues 2010-03-09 11:49 ` Michal Simek @ 2010-03-09 15:41 ` Christoph Lameter -1 siblings, 0 replies; 14+ messages in thread From: Christoph Lameter @ 2010-03-09 15:41 UTC (permalink / raw) To: Michal Simek Cc: Mike Frysinger, KAMEZAWA Hiroyuki, David Howells, torvalds, linux-kernel, linux-mm On Tue, 9 Mar 2010, Michal Simek wrote: > > Signed-off-by: Mike Frysinger <vapier@gentoo.org> > Signed-off-by: Michal Simek <monstr@monstr.eu> ?? You handled this patch? ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [BUGFIX][PATCH] fix sync_mm_rss in nommu (Was Re: sync_mm_rss() issues @ 2010-03-09 15:41 ` Christoph Lameter 0 siblings, 0 replies; 14+ messages in thread From: Christoph Lameter @ 2010-03-09 15:41 UTC (permalink / raw) To: Michal Simek Cc: Mike Frysinger, KAMEZAWA Hiroyuki, David Howells, torvalds, linux-kernel, linux-mm On Tue, 9 Mar 2010, Michal Simek wrote: > > Signed-off-by: Mike Frysinger <vapier@gentoo.org> > Signed-off-by: Michal Simek <monstr@monstr.eu> ?? You handled this patch? -- 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] 14+ messages in thread
* Re: [BUGFIX][PATCH] fix sync_mm_rss in nommu (Was Re: sync_mm_rss() issues 2010-03-09 15:41 ` Christoph Lameter @ 2010-03-09 15:43 ` Mike Frysinger -1 siblings, 0 replies; 14+ messages in thread From: Mike Frysinger @ 2010-03-09 15:43 UTC (permalink / raw) To: Christoph Lameter Cc: Michal Simek, KAMEZAWA Hiroyuki, David Howells, torvalds, linux-kernel, linux-mm On Tue, Mar 9, 2010 at 10:41, Christoph Lameter wrote: > On Tue, 9 Mar 2010, Michal Simek wrote: >> > Signed-off-by: Mike Frysinger <vapier@gentoo.org> >> Signed-off-by: Michal Simek <monstr@monstr.eu> > > ?? You handled this patch? pick out the tags from the original patch -mike ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [BUGFIX][PATCH] fix sync_mm_rss in nommu (Was Re: sync_mm_rss() issues @ 2010-03-09 15:43 ` Mike Frysinger 0 siblings, 0 replies; 14+ messages in thread From: Mike Frysinger @ 2010-03-09 15:43 UTC (permalink / raw) To: Christoph Lameter Cc: Michal Simek, KAMEZAWA Hiroyuki, David Howells, torvalds, linux-kernel, linux-mm On Tue, Mar 9, 2010 at 10:41, Christoph Lameter wrote: > On Tue, 9 Mar 2010, Michal Simek wrote: >> > Signed-off-by: Mike Frysinger <vapier@gentoo.org> >> Signed-off-by: Michal Simek <monstr@monstr.eu> > > ?? You handled this patch? pick out the tags from the original patch -mike -- 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] 14+ messages in thread
end of thread, other threads:[~2010-03-09 15:43 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-03-08 13:59 sync_mm_rss() issues David Howells 2010-03-08 13:59 ` David Howells 2010-03-08 23:50 ` KAMEZAWA Hiroyuki 2010-03-08 23:50 ` KAMEZAWA Hiroyuki 2010-03-09 0:58 ` [BUGFIX][PATCH] fix sync_mm_rss in nommu (Was " KAMEZAWA Hiroyuki 2010-03-09 0:58 ` KAMEZAWA Hiroyuki 2010-03-09 2:33 ` Mike Frysinger 2010-03-09 2:33 ` Mike Frysinger 2010-03-09 11:49 ` Michal Simek 2010-03-09 11:49 ` Michal Simek 2010-03-09 15:41 ` Christoph Lameter 2010-03-09 15:41 ` Christoph Lameter 2010-03-09 15:43 ` Mike Frysinger 2010-03-09 15:43 ` Mike Frysinger
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.