All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robin Holt <holt@sgi.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	cl@linux-foundation.org, tokunaga.keiich@jp.fujitsu.com,
	stable@kernel.org
Subject: Re: [RFC][PATCH 0/2] Quicklist is slighly problematic.
Date: Wed, 20 Aug 2008 21:42:40 -0500	[thread overview]
Message-ID: <20080821024240.GC23397@sgi.com> (raw)
In-Reply-To: <20080820113131.f032c8a2.akpm@linux-foundation.org>

> OK, that's a fatal bug and it's present in 2.6.25.x and 2.6.26.x.  A
> serious issue.
> 
> The patches do apply to both stable kernels and I have tagged them for
> backporting into them.  They're nice and small, but I didn't get a
> really solid yes-this-is-what-we-should-do from Christoph?
> 
> 
> This (from [patch 2/2]): "(Although its patch applied, quicklist can
> waste 64GB on 1TB server (= 1TB / 16), it is still too much??)" is a
> bit of a worry.  Yes, 64GB is too much!  But at least this is now only
> a performance issue rather than a stability issue, yes?

That 64GB is not quite correct.  That assumes all 1TB is free.  The
quicklists are trimmed down as the nodes undergo allocations.  The
problem I see right now is that page tables allocated on one node and
freed on a cpu on a different node could be placed early enough on the
quicklist that it will not be freed until the other node gets under
memory pressure.

Could you give the following a try?  It hasn't even been compiled.  I
think this in addition to your cpus per node change are the right thing
to do.

Thanks,
Robin

Index: ia64-cleanups/include/linux/quicklist.h
===================================================================
--- ia64-cleanups.orig/include/linux/quicklist.h	2008-08-20 21:35:10.000000000 -0500
+++ ia64-cleanups/include/linux/quicklist.h	2008-08-20 21:38:00.891943270 -0500
@@ -66,6 +66,15 @@ static inline void __quicklist_free(int 
 
 static inline void quicklist_free(int nr, void (*dtor)(void *), void *pp)
 {
+#ifdef CONFIG_NUMA
+	unsigned long nid = page_to_nid(virt_to_page(pp));
+
+	if (unlikely(nid != numa_node_id())) {
+		free_page((unsigned long)pp);
+		return;
+	}
+#endif
+
 	__quicklist_free(nr, dtor, pp, virt_to_page(pp));
 }
 

WARNING: multiple messages have this Message-ID (diff)
From: Robin Holt <holt@sgi.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	cl@linux-foundation.org, tokunaga.keiich@jp.fujitsu.com,
	stable@kernel.org
Subject: Re: [RFC][PATCH 0/2] Quicklist is slighly problematic.
Date: Wed, 20 Aug 2008 21:42:40 -0500	[thread overview]
Message-ID: <20080821024240.GC23397@sgi.com> (raw)
In-Reply-To: <20080820113131.f032c8a2.akpm@linux-foundation.org>

> OK, that's a fatal bug and it's present in 2.6.25.x and 2.6.26.x.  A
> serious issue.
> 
> The patches do apply to both stable kernels and I have tagged them for
> backporting into them.  They're nice and small, but I didn't get a
> really solid yes-this-is-what-we-should-do from Christoph?
> 
> 
> This (from [patch 2/2]): "(Although its patch applied, quicklist can
> waste 64GB on 1TB server (= 1TB / 16), it is still too much??)" is a
> bit of a worry.  Yes, 64GB is too much!  But at least this is now only
> a performance issue rather than a stability issue, yes?

That 64GB is not quite correct.  That assumes all 1TB is free.  The
quicklists are trimmed down as the nodes undergo allocations.  The
problem I see right now is that page tables allocated on one node and
freed on a cpu on a different node could be placed early enough on the
quicklist that it will not be freed until the other node gets under
memory pressure.

Could you give the following a try?  It hasn't even been compiled.  I
think this in addition to your cpus per node change are the right thing
to do.

Thanks,
Robin

Index: ia64-cleanups/include/linux/quicklist.h
===================================================================
--- ia64-cleanups.orig/include/linux/quicklist.h	2008-08-20 21:35:10.000000000 -0500
+++ ia64-cleanups/include/linux/quicklist.h	2008-08-20 21:38:00.891943270 -0500
@@ -66,6 +66,15 @@ static inline void __quicklist_free(int 
 
 static inline void quicklist_free(int nr, void (*dtor)(void *), void *pp)
 {
+#ifdef CONFIG_NUMA
+	unsigned long nid = page_to_nid(virt_to_page(pp));
+
+	if (unlikely(nid != numa_node_id())) {
+		free_page((unsigned long)pp);
+		return;
+	}
+#endif
+
 	__quicklist_free(nr, dtor, pp, virt_to_page(pp));
 }
 

--
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>

  reply	other threads:[~2008-08-21  2:42 UTC|newest]

Thread overview: 86+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-20 11:05 [RFC][PATCH 0/2] Quicklist is slighly problematic KOSAKI Motohiro
2008-08-20 11:05 ` KOSAKI Motohiro
2008-08-20 11:07 ` [RFC][PATCH 1/2] Show quicklist at meminfo KOSAKI Motohiro
2008-08-20 11:07   ` KOSAKI Motohiro
2008-08-20 18:35   ` Andrew Morton
2008-08-20 18:35     ` Andrew Morton
2008-08-21  7:36     ` KOSAKI Motohiro
2008-08-21  7:36       ` KOSAKI Motohiro
2008-08-22  1:05       ` KOSAKI Motohiro
2008-08-22  1:05         ` KOSAKI Motohiro
2008-08-22  4:28         ` Andrew Morton
2008-08-22  4:28           ` Andrew Morton
2008-08-22 13:23           ` Robin Holt
2008-08-22 13:23             ` Robin Holt
2008-08-22 13:56             ` Christoph Lameter
2008-08-22 13:56               ` Christoph Lameter
2008-08-23  8:24           ` KOSAKI Motohiro
2008-08-23  8:24             ` KOSAKI Motohiro
2008-08-24  5:29             ` Andrew Morton
2008-08-24  5:29               ` Andrew Morton
2008-08-20 11:08 ` [RFC][PATCH 2/2] quicklist shouldn't be proportional to # of CPUs KOSAKI Motohiro
2008-08-20 11:08   ` KOSAKI Motohiro
2008-08-20 15:27   ` Christoph Lameter
2008-08-20 15:27     ` Christoph Lameter
2008-08-21  6:46   ` Andrew Morton
2008-08-21  6:46     ` Andrew Morton
2008-08-21  7:13     ` David Miller
2008-08-21  7:13       ` David Miller, Andrew Morton
2008-08-21  7:18       ` KOSAKI Motohiro
2008-08-21  7:18         ` KOSAKI Motohiro
2008-08-21  7:27       ` Andrew Morton
2008-08-21  7:27         ` Andrew Morton
2008-08-21  7:31         ` KOSAKI Motohiro
2008-08-21  7:31           ` KOSAKI Motohiro
2008-08-21  9:32         ` Peter Zijlstra
2008-08-21  9:32           ` Peter Zijlstra
2008-08-21 10:04           ` KOSAKI Motohiro
2008-08-21 10:04             ` KOSAKI Motohiro
2008-08-21 10:09             ` David Miller
2008-08-21 10:09               ` David Miller, KOSAKI Motohiro
2008-08-21 10:13               ` KOSAKI Motohiro
2008-08-21 10:13                 ` KOSAKI Motohiro
2008-08-21 10:26                 ` David Miller
2008-08-21 10:26                   ` David Miller, KOSAKI Motohiro
2008-08-21 10:22             ` KOSAKI Motohiro
2008-08-21 10:22               ` KOSAKI Motohiro
2008-08-21 12:02               ` KOSAKI Motohiro
2008-08-21 12:02                 ` KOSAKI Motohiro
2008-08-25 18:48             ` Mike Travis
2008-08-25 18:48               ` Mike Travis
2008-08-25 23:33               ` KOSAKI Motohiro
2008-08-25 23:33                 ` KOSAKI Motohiro
2008-08-26 20:35                 ` Mike Travis
2008-08-26 20:35                   ` Mike Travis
2008-08-25 18:44           ` Mike Travis
2008-08-25 18:44             ` Mike Travis
2008-08-25 18:40       ` Mike Travis
2008-08-25 18:40         ` Mike Travis
2008-08-25 23:31         ` KOSAKI Motohiro
2008-08-25 23:31           ` KOSAKI Motohiro
2008-08-20 14:10 ` [RFC][PATCH 0/2] Quicklist is slighly problematic Christoph Lameter
2008-08-20 14:10   ` Christoph Lameter
2008-08-20 14:49   ` KOSAKI Motohiro
2008-08-20 14:49     ` KOSAKI Motohiro
2008-08-20 15:26     ` Christoph Lameter
2008-08-20 15:26       ` Christoph Lameter
2008-08-21  2:13   ` Robin Holt
2008-08-21  2:13     ` Robin Holt
2008-08-21  2:16     ` Robin Holt
2008-08-21  2:16       ` Robin Holt
2008-08-21  3:08     ` David Miller
2008-08-21  3:08       ` David Miller, Robin Holt
2008-08-21 13:10       ` Christoph Lameter
2008-08-21 13:10         ` Christoph Lameter
2008-08-20 18:31 ` Andrew Morton
2008-08-20 18:31   ` Andrew Morton
2008-08-21  2:42   ` Robin Holt [this message]
2008-08-21  2:42     ` Robin Holt
2008-08-21 13:07     ` Christoph Lameter
2008-08-21 13:07       ` Christoph Lameter
2008-08-21 13:14       ` Robin Holt
2008-08-21 13:14         ` Robin Holt
2008-08-21 13:18         ` Christoph Lameter
2008-08-21 13:18           ` Christoph Lameter
2008-08-21 13:45           ` Robin Holt
2008-08-21 13:45             ` Robin Holt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080821024240.GC23397@sgi.com \
    --to=holt@sgi.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=stable@kernel.org \
    --cc=tokunaga.keiich@jp.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.