linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@linux.intel.com>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Hugh Dickins <hughd@google.com>,
	linux-mm@kvack.org, Cyrill Gorcunov <gorcunov@openvz.org>,
	Pavel Emelyanov <xemul@openvz.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] mm: rename mm->nr_ptes to mm->nr_pgtables
Date: Tue, 13 Jan 2015 13:35:23 -0800	[thread overview]
Message-ID: <54B58F9B.4050100@linux.intel.com> (raw)
In-Reply-To: <20150113204144.GA1865@node.dhcp.inet.fi>

On 01/13/2015 12:41 PM, Kirill A. Shutemov wrote:
> On Tue, Jan 13, 2015 at 12:36:23PM -0800, Dave Hansen wrote:
>> On 01/13/2015 11:14 AM, Kirill A. Shutemov wrote:
>>>  	pgd_t * pgd;
>>>  	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;			/* Page table pages */
>>> +	atomic_long_t nr_pgtables;		/* Page table pages */
>>>  	int map_count;				/* number of VMAs */
>>
>> One more crazy idea...
>>
>> There are 2^9 possible pud pages, 2^18 pmd pages and 2^27 pte pages.
>> That's only 54 bits (technically minus one bit each because the upper
>> half of the address space is for the kernel).
> 
> Does this math make sense for all architecures? IA64? Power?

No, the sizes will be different on the other architectures.  But, 4k
pages with 64-bit ptes is as bad as it gets, I think.  Larger page sizes
mean fewer page tables on powerpc.  So the values should at least _fit_
in a long.

Maybe it's not even worth the trouble.

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

  reply	other threads:[~2015-01-13 21:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-13 19:14 [PATCH 0/2] Account PMD page tables to the process Kirill A. Shutemov
2015-01-13 19:14 ` [PATCH 1/2] mm: rename mm->nr_ptes to mm->nr_pgtables Kirill A. Shutemov
2015-01-13 20:36   ` Dave Hansen
2015-01-13 20:41     ` Kirill A. Shutemov
2015-01-13 21:35       ` Dave Hansen [this message]
2015-01-13 21:43   ` Cyrill Gorcunov
2015-01-13 21:49     ` Dave Hansen
2015-01-14  9:45       ` Cyrill Gorcunov
2015-01-14 14:33         ` Kirill A. Shutemov
2015-01-14 14:48           ` Cyrill Gorcunov
2015-01-13 19:14 ` [PATCH 2/2] mm: account pmd page tables to the process Kirill A. Shutemov

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=54B58F9B.4050100@linux.intel.com \
    --to=dave.hansen@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=gorcunov@openvz.org \
    --cc=hughd@google.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=xemul@openvz.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).