From: "Martin J. Bligh" <Martin.Bligh@us.ibm.com>
To: Andrea Arcangeli <andrea@suse.de>
Cc: Hugh Dickins <hugh@veritas.com>,
Rik van Riel <riel@conectiva.com.br>,
Dave McCracken <dmccr@us.ibm.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Creating a per-task kernel space for kmap, user pagetables, et al
Date: Wed, 20 Mar 2002 14:10:57 -0800 [thread overview]
Message-ID: <147140000.1016662257@flay> (raw)
In-Reply-To: <20020320212341.M4268@dualathlon.random>
--On Wednesday, March 20, 2002 21:23:41 +0100 Andrea Arcangeli <andrea@suse.de> wrote:
> On Wed, Mar 20, 2002 at 11:09:05AM -0800, Martin J. Bligh wrote:
>> 1. A good place to put the process pagetables. We only use up the amount
>> of virtual address space (vaddr space) for one task's pagetables - if we map
>> them into ZONE_NORMAL
>
> we need to walk pagetables not just from the current task and mapping
> pagetables there would decrase the user address space too much.
How much? By calculations I've heard 3Mb or 6Mb, depending on whether
64Gb support is on or not. Doesn't seem like a lot to me. And as I said in my
original email, we could steal this from either user space or kernel space.
> I think you're missing the problem with mainline. There is no shortage
> of virtual address space, there is a shortage of physical ram in the
> zone normal. So we cannot keep them in zone normal (and there's no such
> thing as "mapping in zone_normal"). Maybe I misunderstood what you
> were saying.
The top 128Mb of kernel virtual space is the obvious choice if we're taking
it from kernel space, I wouldn't steal it from the ZONE_NORMAL area (though
I don't think shifting the 896Mb barrier down by 6Mb would kill anyone).
>> through kmap (atomic or persistent), we pay dearly in tlbflushes.
>>
>> 2. A good place to make a per-task kmap area. This would be on a pool system similar to
>> the current persistent kmap. We would potentially do only a local cpu tlb_flush_all when
>
> that would not be similar. There would be only 1 entry per "serie", so
> there would be 1 virtual page for the pagecache and 1 virtual page for
> the pagetables, two pages only in total per-process. It would not be a
> real "pool", just two entries and there would not be a page->virtual
> cache because the page->virtual has to be global. Plus even better,
> those persistent kmaps couldn't block, so I wouldn't need to do the
> _under_lock thing for pte_alloc.
Not sure I grok the above - you mean like the atomic_kmap stuff? The problem
with that is you have to do a tlb_flush_one per access - if we have a pool
we can do a *local* tlb_flush_all per N accesses (where N is sizeof pool).
And as we do a local tlb_flush_all per context switch anyway, we can
probably avoid doing *any* tlbflush in all but the heaviest pool usage if
we're clever about accounting.
> The only difference between this and my scalable kmap outlined in the
> previous emails, is that you won't need to pin the task because the
> mapping will be migrated with the userspace (we must avoid to enable
> lazy-tlb from kernel if we need to use kmaps though). Plus there won't
> be the risk of stalling due running out of entries (so it couldn't
> block).
That seems like a good difference to me. Rik pointed this problem out to
me a couple of months ago, which is why I threw that concept away.
Martin.
prev parent reply other threads:[~2002-03-20 22:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-20 19:09 Creating a per-task kernel space for kmap, user pagetables, et al Martin J. Bligh
2002-03-20 19:36 ` Rik van Riel
2002-03-20 20:26 ` Andrea Arcangeli
2002-03-20 19:45 ` Christoph Hellwig
2002-03-20 23:39 ` Alan Cox
2002-03-21 4:21 ` Itai Nahshon
2002-03-21 13:34 ` Alan Cox
2002-03-21 14:34 ` Martin J. Bligh
2002-03-21 15:38 ` Itai Nahshon
2002-03-20 19:56 ` Hugh Dickins
2002-03-20 20:23 ` Andrea Arcangeli
2002-03-20 20:35 ` Christoph Hellwig
2002-03-20 21:17 ` Hugh Dickins
2002-03-20 21:38 ` Andrea Arcangeli
2002-03-20 21:34 ` Andrea Arcangeli
2002-03-20 21:46 ` Christoph Hellwig
2002-03-20 22:00 ` Andrea Arcangeli
2002-03-21 19:54 ` Greg KH
2002-03-21 23:29 ` Andrea Arcangeli
2002-03-21 23:49 ` William Lee Irwin III
2002-03-22 1:20 ` Andrea Arcangeli
2002-03-20 22:10 ` Martin J. Bligh [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=147140000.1016662257@flay \
--to=martin.bligh@us.ibm.com \
--cc=andrea@suse.de \
--cc=dmccr@us.ibm.com \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@conectiva.com.br \
/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