linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Subject: [PATCHv2, RESEND 19/19] mm: do not add nr_pmds into mm_struct if PMD is folded
Date: Fri,  6 Feb 2015 16:51:04 +0200	[thread overview]
Message-ID: <1423234264-197684-20-git-send-email-kirill.shutemov@linux.intel.com> (raw)
In-Reply-To: <1423234264-197684-1-git-send-email-kirill.shutemov@linux.intel.com>

CONFIG_PGTABLE_LEVELS is now available on every architecture and we can
use it to check if we need to add nr_pmds into mm_struct.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
---
 include/linux/mm_types.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 199a03aab8dc..590630eb59ba 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -364,7 +364,9 @@ struct mm_struct {
 	atomic_t mm_users;			/* How many users with user space? */
 	atomic_t mm_count;			/* How many references to "struct mm_struct" (users count as 1) */
 	atomic_long_t nr_ptes;			/* PTE page table pages */
+#if CONFIG_PGTABLE_LEVELS > 2
 	atomic_long_t nr_pmds;			/* PMD page table pages */
+#endif
 	int map_count;				/* number of VMAs */
 
 	spinlock_t page_table_lock;		/* Protects page tables and some counters */
-- 
2.1.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      parent reply	other threads:[~2015-02-06 14:51 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-06 14:50 [PATCHv2, RESEND 00/19] expose page table levels as Kconfig option Kirill A. Shutemov
2015-02-06 14:50 ` [PATCHv2, RESEND 01/19] alpha: expose number of page table levels on Kconfig level Kirill A. Shutemov
2015-02-06 16:26   ` Richard Henderson
2015-02-06 14:50 ` [PATCHv2, RESEND 02/19] arm64: " Kirill A. Shutemov
2015-02-06 14:50 ` [PATCHv2, RESEND 03/19] arm: " Kirill A. Shutemov
2015-02-06 14:50 ` [PATCHv2, RESEND 04/19] frv: mark PUD and PMD folded Kirill A. Shutemov
2015-02-06 14:50 ` [PATCHv2, RESEND 05/19] ia64: expose number of page table levels on Kconfig level Kirill A. Shutemov
2015-02-06 14:50 ` [PATCHv2, RESEND 06/19] m32r: mark PMD folded Kirill A. Shutemov
2015-02-06 14:50 ` [PATCHv2, RESEND 07/19] m68k: mark PMD folded and expose number of page table levels Kirill A. Shutemov
2015-02-06 14:50 ` [PATCHv2, RESEND 08/19] mips: expose number of page table levels on Kconfig level Kirill A. Shutemov
2015-02-06 14:50 ` [PATCHv2, RESEND 09/19] mn10300: mark PUD and PMD folded Kirill A. Shutemov
2015-02-06 14:50 ` [PATCHv2, RESEND 10/19] parisc: expose number of page table levels on Kconfig level Kirill A. Shutemov
2015-02-06 14:50 ` [PATCHv2, RESEND 11/19] powerpc: " Kirill A. Shutemov
2015-02-06 14:50 ` [PATCHv2, RESEND 12/19] s390: expose number of page table levels Kirill A. Shutemov
2015-02-06 14:50 ` [PATCHv2, RESEND 13/19] sh: " Kirill A. Shutemov
2015-02-06 14:50 ` [PATCHv2, RESEND 14/19] sparc: " Kirill A. Shutemov
2015-02-06 14:51 ` [PATCHv2, RESEND 15/19] tile: " Kirill A. Shutemov
2015-02-06 14:51 ` [PATCHv2, RESEND 16/19] um: " Kirill A. Shutemov
2015-02-06 14:51 ` [PATCHv2, RESEND 17/19] x86: expose number of page table levels on Kconfig level Kirill A. Shutemov
2015-02-06 14:51 ` [PATCHv2, RESEND 18/19] mm: define default PGTABLE_LEVELS to two Kirill A. Shutemov
2015-02-06 14:51 ` Kirill A. Shutemov [this message]

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=1423234264-197684-20-git-send-email-kirill.shutemov@linux.intel.com \
    --to=kirill.shutemov@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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