+ powerpc-powernv-hold-device_hotplug_lock-when-calling-memtrace_offline_pages-v3.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: powerpc-powernv-hold-device_hotplug_lock-when-calling-memtrace_offline_pages-v3
has been added to the -mm tree.  Its filename is
     powerpc-powernv-hold-device_hotplug_lock-when-calling-memtrace_offline_pages-v3.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/powerpc-powernv-hold-device_hotplug_lock-when-calling-memtrace_offline_pages-v3.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/powerpc-powernv-hold-device_hotplug_lock-when-calling-memtrace_offline_pages-v3.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: David Hildenbrand <david@xxxxxxxxxx>
Subject: powerpc-powernv-hold-device_hotplug_lock-when-calling-memtrace_offline_pages-v3

- Take device_hotplug_lock outside of loop
- Add Ack

Link: http://lkml.kernel.org/r/20180927092554.13567-6-david@xxxxxxxxxx
Reviewed-by: Pavel Tatashin <pavel.tatashin@xxxxxxxxxxxxx>
Reviewed-by: Rashmica Gupta <rashmica.g@xxxxxxxxx>
Acked-by: Balbir Singh <bsingharora@xxxxxxxxx>
Signed-off-by: David Hildenbrand <david@xxxxxxxxxx>
Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
Cc: Rashmica Gupta <rashmica.g@xxxxxxxxx>
Cc: Balbir Singh <bsingharora@xxxxxxxxx>
Cc: Michael Neuling <mikey@xxxxxxxxxxx>
Cc: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
Cc: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
Cc: John Allen <jallen@xxxxxxxxxxxxxxxxxx>
Cc: Jonathan Corbet <corbet@xxxxxxx>
Cc: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx>
Cc: Juergen Gross <jgross@xxxxxxxx>
Cc: Kate Stewart <kstewart@xxxxxxxxxxxxxxxxxxx>
Cc: "K. Y. Srinivasan" <kys@xxxxxxxxxxxxx>
Cc: Len Brown <lenb@xxxxxxxxxx>
Cc: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>
Cc: Mathieu Malaterre <malat@xxxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxx>
Cc: Nathan Fontenot <nfont@xxxxxxxxxxxxxxxxxx>
Cc: Oscar Salvador <osalvador@xxxxxxx>
Cc: Philippe Ombredanne <pombredanne@xxxxxxxx>
Cc: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
Cc: "Rafael J. Wysocki" <rjw@xxxxxxxxxxxxx>
Cc: Stephen Hemminger <sthemmin@xxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Vlastimil Babka <vbabka@xxxxxxx>
Cc: YASUAKI ISHIMATSU <yasu.isimatu@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 arch/powerpc/platforms/powernv/memtrace.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/arch/powerpc/platforms/powernv/memtrace.c~powerpc-powernv-hold-device_hotplug_lock-when-calling-memtrace_offline_pages-v3
+++ a/arch/powerpc/platforms/powernv/memtrace.c
@@ -111,8 +111,8 @@ static u64 memtrace_alloc_node(u32 nid,
 	/* Trace memory needs to be aligned to the size */
 	end_pfn = round_down(end_pfn - nr_pages, nr_pages);
 
+	lock_device_hotplug();
 	for (base_pfn = end_pfn; base_pfn > start_pfn; base_pfn -= nr_pages) {
-		lock_device_hotplug();
 		if (memtrace_offline_pages(nid, base_pfn, nr_pages) == true) {
 			/*
 			 * Remove memory in memory block size chunks so that
@@ -127,8 +127,8 @@ static u64 memtrace_alloc_node(u32 nid,
 			unlock_device_hotplug();
 			return base_pfn << PAGE_SHIFT;
 		}
-		unlock_device_hotplug();
 	}
+	unlock_device_hotplug();
 
 	return 0;
 }
_

Patches currently in -mm which might be from david@xxxxxxxxxx are

mm-memory_hotplug-make-remove_memory-take-the-device_hotplug_lock.patch
mm-memory_hotplug-make-add_memory-take-the-device_hotplug_lock.patch
mm-memory_hotplug-fix-online-offline_pages-called-wo-mem_hotplug_lock.patch
powerpc-powernv-hold-device_hotplug_lock-when-calling-device_online.patch
powerpc-powernv-hold-device_hotplug_lock-when-calling-memtrace_offline_pages.patch
powerpc-powernv-hold-device_hotplug_lock-when-calling-memtrace_offline_pages-v3.patch
memory-hotplugtxt-add-some-details-about-locking-internals.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux