Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1186847

Re: [PATCH 3/3] mm, meminit: Allow early_pfn_to_nid to be used during runtime

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH 3/3] mm, meminit: Allow early_pfn_to_nid to be used during runtime
Date 2015-07-17 16:00 +0200
Message-ID <pNelc-7eZ-9@gated-at.bofh.it> (permalink)
References (1 earlier) <pNcW6-5lc-13@gated-at.bofh.it> <pNdIv-6vu-29@gated-at.bofh.it> <pNdIu-6vu-27@gated-at.bofh.it> <pNdSa-6GQ-13@gated-at.bofh.it> <pNe1R-6Sg-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Jul 17, 2015 at 02:39:13PM +0100, Mel Gorman wrote:

> I'm don't know and no longer have access to the necessary machine to test
> any more. You make a reasonable point and I would be surprised if it was
> noticable. On the other hand, conditional locking is evil and the patch
> reflected my thinking at the time "we don't need locks during boot". It's
> the type of thinking that should be backed with figures if it was to be
> used at all so lets go with;

Last time I tested it, an uncontended spinlock (cache hot) ran around 20
cycles, the unlock is a regular store (x86) and in single digit cycles.
I doubt modern hardware makes it go slower.

> ---8<---
> mm, meminit: Allow early_pfn_to_nid to be used during runtime v2
> 
> early_pfn_to_nid historically was inherently not SMP safe but only
> used during boot which is inherently single threaded or during hotplug
> which is protected by a giant mutex. With deferred memory initialisation
> there was a thread-safe version introduced and the early_pfn_to_nid
> would trigger a BUG_ON if used unsafely. Memory hotplug hit that check.
> This patch makes early_pfn_to_nid introduces a lock to make it safe to
> use during hotplug.
> 
> Reported-and-tested-by: Alex Ng <alexng@microsoft.com>
> Signed-off-by: Mel Gorman <mgorman@suse.de>

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
--
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/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 3/3] mm, meminit: Allow early_pfn_to_nid to be used during runtime Mel Gorman <mgorman@suse.de> - 2015-07-17 14:30 +0200
  Re: [PATCH 3/3] mm, meminit: Allow early_pfn_to_nid to be used  during runtime Mel Gorman <mgorman@suse.de> - 2015-07-17 15:20 +0200
    Re: [PATCH 3/3] mm, meminit: Allow early_pfn_to_nid to be used  during runtime Peter Zijlstra <peterz@infradead.org> - 2015-07-17 15:30 +0200
      Re: [PATCH 3/3] mm, meminit: Allow early_pfn_to_nid to be used  during runtime Mel Gorman <mgorman@suse.de> - 2015-07-17 15:40 +0200
        Re: [PATCH 3/3] mm, meminit: Allow early_pfn_to_nid to be used  during runtime Peter Zijlstra <peterz@infradead.org> - 2015-07-17 16:00 +0200
  Re: [PATCH 3/3] mm, meminit: Allow early_pfn_to_nid to be used  during runtime Peter Zijlstra <peterz@infradead.org> - 2015-07-17 15:20 +0200

csiph-web