From: Andrea Arcangeli <aarcange@redhat.com>
To: Mel Gorman <mel@csn.ul.ie>
Cc: Peter Zijlstra <peterz@infradead.org>,
r6144 <rainy6144@gmail.com>,
linux-kernel@vger.kernel.org, Darren Hart <dvhltc@us.ibm.com>,
tglx <tglx@linutronix.de>,
Lee Schermerhorn <lee.schermerhorn@hp.com>
Subject: Re: Process-shared futexes on hugepages puts the kernel in an infinite loop in 2.6.32.11; is this fixed now?
Date: Mon, 19 Apr 2010 17:48:46 +0200 [thread overview]
Message-ID: <20100419154846.GY32034@random.random> (raw)
In-Reply-To: <20100419153245.GX19264@csn.ul.ie>
On Mon, Apr 19, 2010 at 04:32:45PM +0100, Mel Gorman wrote:
> +#define HUGETLB_PRIVATE_MAPPING (0x2e4 | PAGE_MAPPING_ANON)
Cute indeed.
BTW, just in case I tested this on transparent hugepage and it works
fine (it uses no cpu and can be killed with C^c). I had to hack it
like below to allocate the semaphore on hugepages without
khugepaged. I verified 1 hugepage is allocated (thanks to memory
compaction there's an huge excess of hugepages compared to what my
regular apps can eat ;). Furthermore I found gcc bypasses malloc so a
small patch to gcc should move it all into hugepages. Then maybe we
can build the kernel faster and definitely translate.o will build 8%
faster with the default khugepaged scan_sleep_millisecs settings
(waiting to be confirmed but I exclude bad surprises, whatever runs
fast with khugepaged has will run even faster without it if something,
or equal in the worst case).
Thanks,
Andrea
--- process-shared-sem-hugepage.c.orig 2010-04-19 17:43:47.278964888 +0200
+++ process-shared-sem-hugepage.c 2010-04-19 17:44:01.100032774 +0200
@@ -30,6 +30,7 @@ int main(void)
g_thread_init(NULL);
workers = g_new(GThread *, NWORKER); work_sem = g_new(sem_t, 1);
+ posix_memalign(&work_sem, 2*1024*1024, 2*1024*1024);
result = sem_init(work_sem, TRUE, 0); g_assert(result == 0);
for (i = 0; i < NWORKER; i++) {
next prev parent reply other threads:[~2010-04-19 15:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-16 15:45 Process-shared futexes on hugepages puts the kernel in an infinite loop in 2.6.32.11; is this fixed now? r6144
2010-04-16 20:27 ` Peter Zijlstra
2010-04-19 11:43 ` Mel Gorman
2010-04-19 11:52 ` Peter Zijlstra
2010-04-19 15:32 ` Mel Gorman
2010-04-19 15:45 ` Peter Zijlstra
2010-04-19 16:11 ` Andrea Arcangeli
2010-04-19 16:18 ` Peter Zijlstra
2010-04-19 16:32 ` Andrea Arcangeli
2010-04-19 16:34 ` Mel Gorman
2010-04-19 15:48 ` Andrea Arcangeli [this message]
2010-04-19 16:04 ` Darren Hart
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=20100419154846.GY32034@random.random \
--to=aarcange@redhat.com \
--cc=dvhltc@us.ibm.com \
--cc=lee.schermerhorn@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mel@csn.ul.ie \
--cc=peterz@infradead.org \
--cc=rainy6144@gmail.com \
--cc=tglx@linutronix.de \
/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.