linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au
Cc: linuxppc-dev@lists.ozlabs.org,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Subject: [PATCH V2 1/4] powerpc/mm/slice: Update documentation in the file.
Date: Mon, 26 Feb 2018 19:38:23 +0530	[thread overview]
Message-ID: <20180226140826.11641-2-aneesh.kumar@linux.vnet.ibm.com> (raw)
In-Reply-To: <20180226140826.11641-1-aneesh.kumar@linux.vnet.ibm.com>

We will make code changes in the next patch. To make the review easier split
the documentation update in to a seperate patch.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
 arch/powerpc/mm/slice.c | 27 +++++++++++++++++++--------
 1 file changed, 19 insertions(+), 8 deletions(-)

diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c
index 98b53d48968f..259bbda9a222 100644
--- a/arch/powerpc/mm/slice.c
+++ b/arch/powerpc/mm/slice.c
@@ -478,7 +478,7 @@ unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len,
 	 * already
 	 */
 	slice_mask_for_size(mm, psize, &good_mask, high_limit);
-	slice_print_mask(" good_mask", good_mask);
+	slice_print_mask("Mask for page size", good_mask);
 
 	/*
 	 * Here "good" means slices that are already the right page size,
@@ -507,15 +507,17 @@ unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len,
 			slice_or_mask(&good_mask, &compat_mask);
 	}
 #endif
-
 	/* First check hint if it's valid or if we have MAP_FIXED */
 	if (addr != 0 || fixed) {
-		/* Build a mask for the requested range */
+		/*
+		 * Build a mask for the requested range
+		 */
 		slice_range_to_mask(addr, len, &mask);
-		slice_print_mask(" mask", mask);
+		slice_print_mask("Request range mask", mask);
 
-		/* Check if we fit in the good mask. If we do, we just return,
-		 * nothing else to do
+		/*
+		 * Check if we fit in the good mask. If we do, we just
+		 * return, nothing else to do
 		 */
 		if (slice_check_fit(mm, mask, good_mask)) {
 			slice_dbg(" fits good !\n");
@@ -553,8 +555,8 @@ unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len,
 		return -EBUSY;
 
 	slice_dbg(" search...\n");
-
-	/* If we had a hint that didn't work out, see if we can fit
+	/*
+	 * If we had a hint that didn't work out, see if we can fit
 	 * anywhere in the good area.
 	 */
 	if (addr) {
@@ -573,7 +575,16 @@ unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len,
 			       psize, topdown, high_limit);
 
 #ifdef CONFIG_PPC_64K_PAGES
+	/*
+	 * If we didn't request for fixed mapping, we never looked at
+	 * compat area. Now that we are not finding space, let's look
+	 * at the 4K slice also.
+	 */
 	if (addr == -ENOMEM && psize == MMU_PAGE_64K) {
+		/*
+		 * mask variable is free here. Use that for compat
+		 * size mask.
+		 */
 		/* retry the search with 4k-page slices included */
 		slice_or_mask(&potential_mask, &compat_mask);
 		addr = slice_find_area(mm, len, potential_mask,
-- 
2.14.3

  reply	other threads:[~2018-02-26 14:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-26 14:08 [PATCH V2 0/4] Add support for 4PB virtual address space on hash Aneesh Kumar K.V
2018-02-26 14:08 ` Aneesh Kumar K.V [this message]
2018-02-26 14:08 ` [PATCH V2 2/4] powerpc/mm/slice: Reduce the stack usage in slice_get_unmapped_area Aneesh Kumar K.V
2018-02-26 22:24   ` Nicholas Piggin
2018-02-27  4:01     ` Aneesh Kumar K.V
2018-02-26 14:08 ` [PATCH V2 3/4] powerpc/mm: Add support for handling > 512TB address in SLB miss Aneesh Kumar K.V
2018-02-26 14:08 ` [PATCH V2 4/4] powerpc/mm/hash64: Increase the VA range Aneesh Kumar K.V
2018-02-26 18:11   ` Murilo Opsfelder Araujo
2018-02-27  4:02     ` Aneesh Kumar K.V
2018-02-28 23:06   ` kbuild test robot
2018-02-26 14:15 ` [PATCH V2 0/4] Add support for 4PB virtual address space on hash Aneesh Kumar K.V

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=20180226140826.11641-2-aneesh.kumar@linux.vnet.ibm.com \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).