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


Groups > linux.kernel > #1287376 > unrolled thread

[PATCH 3.16.y-ckt 024/126] Revert "mm: Check if section present during memory block (un)registering"

Started byLuis Henriques <luis.henriques@canonical.com>
First post2015-12-09 11:40 +0100
Last post2015-12-13 20:00 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3.16.y-ckt 024/126] Revert "mm: Check if section present during memory block (un)registering" Luis Henriques <luis.henriques@canonical.com> - 2015-12-09 11:40 +0100
    Re: [PATCH 3.16.y-ckt 024/126] Revert "mm: Check if section present  during memory block (un)registering" Ben Hutchings <ben@decadent.org.uk> - 2015-12-12 05:40 +0100
      Re: [PATCH 3.16.y-ckt 024/126] Revert "mm: Check if section present  during memory block (un)registering" Luis Henriques <luis.henriques@canonical.com> - 2015-12-13 20:00 +0100

#1287376 — [PATCH 3.16.y-ckt 024/126] Revert "mm: Check if section present during memory block (un)registering"

FromLuis Henriques <luis.henriques@canonical.com>
Date2015-12-09 11:40 +0100
Subject[PATCH 3.16.y-ckt 024/126] Revert "mm: Check if section present during memory block (un)registering"
Message-ID<qDKk9-7aE-1@gated-at.bofh.it>
3.16.7-ckt21 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 8346aa765e14348b7b436825b3c4740895a2fe1a upstream.

This reverts commit 7568fb63f57ac8672f8bf2018171255441238882 as it's
already in Linus's tree through a different patch.

Reported-by: Tony Luck <tony.luck@intel.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 drivers/base/node.c | 31 ++++---------------------------
 1 file changed, 4 insertions(+), 27 deletions(-)

diff --git a/drivers/base/node.c b/drivers/base/node.c
index 7334e47996bc..5777d10d1e25 100644
--- a/drivers/base/node.c
+++ b/drivers/base/node.c
@@ -397,18 +397,7 @@ int register_mem_sect_under_node(struct memory_block *mem_blk, int nid)
 	sect_end_pfn = section_nr_to_pfn(mem_blk->end_section_nr);
 	sect_end_pfn += PAGES_PER_SECTION - 1;
 	for (pfn = sect_start_pfn; pfn <= sect_end_pfn; pfn++) {
-		int page_nid, scn_nr;
-
-		/*
-		 * memory block could have several absent sections from start.
-		 * skip pfn range from absent section
-		 */
-		scn_nr = pfn_to_section_nr(pfn);
-		if (!present_section_nr(scn_nr)) {
-			pfn = round_down(pfn + PAGES_PER_SECTION,
-					 PAGES_PER_SECTION) - 1;
-			continue;
-		}
+		int page_nid;
 
 		/*
 		 * memory block could have several absent sections from start.
@@ -454,22 +443,10 @@ int unregister_mem_sect_under_nodes(struct memory_block *mem_blk,
 		return -ENOMEM;
 	nodes_clear(*unlinked_nodes);
 
-	sect_start_pfn = section_nr_to_pfn(mem_blk->start_section_nr);
-	sect_end_pfn = section_nr_to_pfn(mem_blk->end_section_nr);
-	sect_end_pfn += PAGES_PER_SECTION - 1;
+	sect_start_pfn = section_nr_to_pfn(phys_index);
+	sect_end_pfn = sect_start_pfn + PAGES_PER_SECTION - 1;
 	for (pfn = sect_start_pfn; pfn <= sect_end_pfn; pfn++) {
-		int nid, scn_nr;
-
-		/*
-		 * memory block could have several absent sections from start.
-		 * skip pfn range from absent section
-		 */
-		scn_nr = pfn_to_section_nr(pfn);
-		if (!present_section_nr(scn_nr)) {
-			pfn = round_down(pfn + PAGES_PER_SECTION,
-					 PAGES_PER_SECTION) - 1;
-			continue;
-		}
+		int nid;
 
 		nid = get_nid_for_pfn(pfn);
 		if (nid < 0)
--
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/

[toc] | [next] | [standalone]


#1290110 — Re: [PATCH 3.16.y-ckt 024/126] Revert "mm: Check if section present during memory block (un)registering"

FromBen Hutchings <ben@decadent.org.uk>
Date2015-12-12 05:40 +0100
SubjectRe: [PATCH 3.16.y-ckt 024/126] Revert "mm: Check if section present during memory block (un)registering"
Message-ID<qEK8p-5Nw-5@gated-at.bofh.it>
In reply to#1287376

[Multipart message — attachments visible in raw view] — view raw

On Wed, 2015-12-09 at 09:36 +0000, Luis Henriques wrote:
> 3.16.7-ckt21 -stable review patch.  If anyone has any objections, please let me know.
> 
> ------------------
> 
> From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> 
> commit 8346aa765e14348b7b436825b3c4740895a2fe1a upstream.
> 
> This reverts commit 7568fb63f57ac8672f8bf2018171255441238882 as it's
> already in Linus's tree through a different patch.
> 
> Reported-by: Tony Luck <tony.luck@intel.com>
> Cc: Yinghai Lu <yinghai@kernel.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
[...]

The reverted commit is patch 021/126 in this series, so you can drop
both of these.

Ben.

-- 
Ben Hutchings
Knowledge is power.  France is bacon.

[toc] | [prev] | [next] | [standalone]


#1290669 — Re: [PATCH 3.16.y-ckt 024/126] Revert "mm: Check if section present during memory block (un)registering"

FromLuis Henriques <luis.henriques@canonical.com>
Date2015-12-13 20:00 +0100
SubjectRe: [PATCH 3.16.y-ckt 024/126] Revert "mm: Check if section present during memory block (un)registering"
Message-ID<qFk2e-3De-13@gated-at.bofh.it>
In reply to#1290110
On Sat, Dec 12, 2015 at 04:37:10AM +0000, Ben Hutchings wrote:
> On Wed, 2015-12-09 at 09:36 +0000, Luis Henriques wrote:
> > 3.16.7-ckt21 -stable review patch.  If anyone has any objections, please let me know.
> > 
> > ------------------
> > 
> > From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > 
> > commit 8346aa765e14348b7b436825b3c4740895a2fe1a upstream.
> > 
> > This reverts commit 7568fb63f57ac8672f8bf2018171255441238882 as it's
> > already in Linus's tree through a different patch.
> > 
> > Reported-by: Tony Luck <tony.luck@intel.com>
> > Cc: Yinghai Lu <yinghai@kernel.org>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
> [...]
> 
> The reverted commit is patch 021/126 in this series, so you can drop
> both of these.
> 

This is a bit embarrassing... :-)
(In fact, I saw this and forgot to drop the patches, which makes it
even more embarrassing.)

Anyway, both patches have now been dropped.  Thanks Ben.

Cheers,
--
Luís

> Ben.
> 
> -- 
> Ben Hutchings
> Knowledge is power.  France is bacon.

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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web