linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nadav Amit <nadav.amit@gmail.com>
To: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Matthew Wilcox <willy@infradead.org>,
	Christopher Lameter <cl@linux.com>,
	Boaz Harrosh <boazh@netapp.com>, Jeff Moyer <jmoyer@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, Peter Zijlstra <peterz@infradead.org>,
	Rik van Riel <riel@redhat.com>, Jan Kara <jack@suse.cz>,
	Matthew Wilcox <mawilcox@microsoft.com>,
	Amit Golander <Amit.Golander@netapp.com>
Subject: Re: [PATCH] mm: Add new vma flag VM_LOCAL_CPU
Date: Wed, 23 May 2018 10:46:26 -0700	[thread overview]
Message-ID: <45CBAC53-610A-485B-95D8-4357261338BF@gmail.com> (raw)
In-Reply-To: <5e20be19-28ba-189a-6935-698a012a6665@linux.intel.com>

Dave Hansen <dave.hansen@linux.intel.com> wrote:

> On 05/22/2018 10:51 AM, Matthew Wilcox wrote:
>> But CR3 is a per-CPU register.  So it'd be *possible* to allocate one
>> PGD per CPU (per process).  Have them be identical in all but one of
>> the PUD entries.  Then you've reserved 1/512 of your address space for
>> per-CPU pages.
>> 
>> Complicated, ugly, memory-consuming.  But possible.
> 
> Yep, and you'd probably want a cache of them so you don't end up having
> to go rewrite half of the PGD every time you context-switch.  But, on
> the plus side, the logic would be pretty similar if not identical to the
> way that we manage PCIDs.  If your mm was recently active on the CPU,
> you can use a PGD that's already been constructed.  If not, you're stuck
> making a new one.
> 
> Andy L. was alto talking about using this kind of mechanism to simplify
> the entry code.  Instead of needing per-cpu areas where we index by the
> CPU number, or by using %GS, we could have per-cpu data or code that has
> a fixed virtual address.
> 
> It'd be a fun project, but it might not ever pan out.

For the record: there are several academic studies about this subject. The
most notable one is Corey [1].

[1] https://www.usenix.org/legacy/event/osdi08/tech/full_papers/boyd-wickizer/boyd_wickizer.pdf

  reply	other threads:[~2018-05-23 17:46 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-14 17:28 [PATCH] mm: Add new vma flag VM_LOCAL_CPU Boaz Harrosh
2018-05-14 18:26 ` Boaz Harrosh
2018-05-15  7:08   ` Christoph Hellwig
2018-05-15 10:45     ` Boaz Harrosh
2018-05-14 19:15 ` Matthew Wilcox
2018-05-14 19:37   ` Boaz Harrosh
2018-05-15  0:41     ` Matthew Wilcox
2018-05-15 10:43       ` Boaz Harrosh
2018-05-15 11:11         ` Matthew Wilcox
2018-05-15 11:41           ` Boaz Harrosh
2018-05-15 12:03             ` Matthew Wilcox
2018-05-15 13:29               ` Boaz Harrosh
2018-05-15 13:50                 ` Matthew Wilcox
2018-05-15 14:10                   ` Boaz Harrosh
2018-05-15 14:18                     ` Matthew Wilcox
2018-05-15 14:30                       ` Boaz Harrosh
2018-05-15 12:09             ` Peter Zijlstra
2018-05-15 12:31               ` Boaz Harrosh
2018-05-15 11:47         ` Peter Zijlstra
2018-05-15 12:01           ` Boaz Harrosh
2018-05-15 12:07         ` Mark Rutland
2018-05-15 12:35           ` Peter Zijlstra
2018-05-15 13:19           ` Boaz Harrosh
2018-05-18 14:14         ` Christopher Lameter
2018-05-22 16:05           ` Boaz Harrosh
2018-05-22 16:18             ` Dave Hansen
2018-05-22 16:46               ` Christopher Lameter
2018-05-22 16:56                 ` Peter Zijlstra
2018-05-22 17:03                 ` Dave Hansen
2018-05-22 17:35                   ` Christopher Lameter
2018-05-22 17:51                   ` Matthew Wilcox
2018-05-23 17:30                     ` Dave Hansen
2018-05-23 17:46                       ` Nadav Amit [this message]
2018-05-23 18:10             ` Mark Rutland
2018-05-14 21:49 ` Andrew Morton
2018-05-15  0:44   ` Matthew Wilcox
2018-05-15 11:54     ` Boaz Harrosh
2018-05-15 13:24       ` Boaz Harrosh
2018-05-15 14:17       ` Peter Zijlstra
2018-05-15 14:36         ` Boaz Harrosh
2018-05-15 14:19 ` Dave Hansen

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=45CBAC53-610A-485B-95D8-4357261338BF@gmail.com \
    --to=nadav.amit@gmail.com \
    --cc=Amit.Golander@netapp.com \
    --cc=akpm@linux-foundation.org \
    --cc=boazh@netapp.com \
    --cc=cl@linux.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jack@suse.cz \
    --cc=jmoyer@redhat.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mawilcox@microsoft.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=riel@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=willy@infradead.org \
    --cc=x86@kernel.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).