mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Martin J. Bligh" <Martin.Bligh@us.ibm.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Benjamin LaHaise <bcrl@redhat.com>,
	Andrea Arcangeli <andrea@suse.de>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Chris Friesen <cfriesen@nortelnetworks.com>,
	Pavel Machek <pavel@elf.ucw.cz>,
	linux-kernel@vger.kernel.org, linux-aio@kvack.org
Subject: Re: aio-core why not using SuS? [Re: [rfc] aio-core for 2.5.29 (Re: async-io API registration for 2.5.29)]
Date: Fri, 16 Aug 2002 22:12:04 -0700	[thread overview]
Message-ID: <2159880183.1029535922@[10.10.2.3]> (raw)
In-Reply-To: <Pine.LNX.4.44.0208162134440.2497-100000@home.transmeta.com>

>> 1. We have a per-process UKVA (user-kernel virtual address space), 
> 
> What is your definition of a "process"?

Sorry ... per shared address space ... so multiple tasks sharing an
mm are 1 process (to me at least).
 
> And what is your definition of a "task"?
> 
> You seem to think that a task is one thread ("per task things like the
> kernel stack"), ie a 1:1 mapping with a "struct task_stuct".

yup, that's what I meant. task == 1 task_struct.
 
> But if you have such a mapping, then you _cannot_ make a per-task VM
> space, because many tasks will share the same VM. You cannot even do a
> per-cpu mapping change (and rewrite the VM on thread switch), since the VM
> is _shared_ across CPU's, and absolutely has to be in order to work with
> CPU's that do TLB fill in hardware (eg x86).

I don't see why the area above PAGE_OFFSET has to be global, or per
VM (by which I'm assuming you're meaning the set of pagetables per
process, aka group of tasks sharing an mm). 

Assume 3 level page tables and a 3/1 user/kernel split for the sake 
of argument. The bottom 3 PGD entries point to user PMD pages, 
and the top 1 to the kernel PMD page. At the moment, the PGDs are per
VM, but say we make them per task instead ... each task also gets
a copy of the standard kernel PMD (which never changes in the normal
course of things). In that PMD, we tweak the top couple of entries
to point to a per-task set of entries ... but the rest of the PMD
entries all point back to a shared set of PTE entries (well, except
ZONE_NORMAL is all large pages, so there ain't none for those).

Yes, I guess you'd have to TLB flush on the context switch with 
shared mm's which you don't have to do now, and you'd use an extra
couple of pages per task, but that's of phys ram, not vaddr space
which is what's precious. I think that all works, but it's kind of
late ;-)

It also has the advantage that you can wedge kernel text replication
for NUMA in the per-task PMD entries.

> The fact is, that in order to get the right TLB behaviour, the _only_
> thing you can do is to have a "per-MM UKVA". It's not per thread, and it's
> not per process. It's one per MM, which is _neither_.

OK, I was defining a process as the set of tasks sharing an MM. 
You seem to have a different definition - could you clarify for me?

> And this is where the problems come in. Since it is per-MM (and thus 
> shared across CPU's) updates need to be SMP-safe. And since it is per-MM, 
> it means that _any_ data structure that might be shared across different 
> MM's are really really dangerous to put in this thing (think virtual 
> caches on some hardware). 

OK ... I wasn't thinking virtual caches, I'll admit. But how many 
crazy 32 bit architectures do we have wanting 64Gb of RAM? ;-)
I *think* this is OK for ia32? 64 bit machines don't care about
all this nonsense.

> And since it is per-MM, it means that anything that there can be multiple 
> of per MM (which is pretty much _every_ data structure in the kernel) 
> cannot go at a fixed address or anything like that, but needs to be 
> allocated within the per-MM area dynamically.

right. I didn't mean to imply that it's trivial, or a panacea, 
but it's an interesting concept.

M.


  parent reply	other threads:[~2002-08-17  5:10 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-30  5:41 async-io API registration for 2.5.29 Andrea Arcangeli
2002-07-30  8:11 ` Christoph Hellwig
2002-07-30 13:40   ` Linus Torvalds
2002-07-30 13:52     ` Benjamin LaHaise
2002-07-30 16:43   ` Andrea Arcangeli
2002-07-30 16:59     ` Benjamin LaHaise
2002-07-30 19:10       ` Jeff Dike
2002-07-30 18:09         ` Benjamin LaHaise
2002-07-30 18:15           ` Linus Torvalds
2002-07-30 18:31             ` Benjamin LaHaise
2002-07-30 20:57               ` Jeff Dike
2002-07-30 20:47           ` Jeff Dike
2002-07-30 21:26       ` Andrea Arcangeli
2002-07-30 10:50 ` Rik van Riel
2002-07-30 12:49 ` Benjamin LaHaise
2002-07-30 13:29   ` Suparna Bhattacharya
2002-07-30 21:41   ` Andrea Arcangeli
2002-07-30 21:54     ` [rfc] aio-core for 2.5.29 (Re: async-io API registration for 2.5.29) Benjamin LaHaise
2002-07-31  0:44       ` Andrea Arcangeli
2002-07-31 14:46         ` Benjamin LaHaise
2002-07-31 16:31         ` Charles 'Buck' Krasic
2002-08-01 10:30         ` Pavel Machek
2002-08-01 14:47           ` Benjamin LaHaise
2002-08-01 15:00             ` Chris Friesen
2002-08-01 16:09               ` Linus Torvalds
2002-08-01 17:30                 ` Alan Cox
2002-08-01 16:30                   ` Linus Torvalds
2002-08-01 16:41                     ` [rfc] aio-core for 2.5.29 (Re: async-io API registration for2.5.29) Chris Friesen
2002-08-01 18:01                     ` [rfc] aio-core for 2.5.29 (Re: async-io API registration for 2.5.29) Benjamin LaHaise
2002-08-15 23:54                       ` aio-core why not using SuS? [Re: [rfc] aio-core for 2.5.29 (Re: async-io API registration for 2.5.29)] Andrea Arcangeli
2002-08-16  1:42                         ` Benjamin LaHaise
2002-08-16  1:57                           ` Andrea Arcangeli
2002-08-16  2:00                             ` Benjamin LaHaise
2002-08-16  2:08                               ` Linus Torvalds
2002-08-16  2:16                                 ` Benjamin LaHaise
2002-08-16  2:40                                   ` Andrea Arcangeli
2002-08-16  3:43                                   ` Linus Torvalds
2002-08-16  3:50                                     ` Linus Torvalds
2002-08-16  4:47                                       ` William Lee Irwin III
2002-08-17  3:46                                   ` Martin J. Bligh
2002-08-17  4:00                                     ` Linus Torvalds
2002-08-17  4:15                                       ` Martin J. Bligh
2002-08-17  4:46                                         ` Linus Torvalds
2001-11-02  5:12                                           ` Pavel Machek
2002-08-17  5:04                                           ` Linus Torvalds
2002-08-17  5:24                                             ` lots of mem on 32 bit machines (was: aio-core why not using SuS?) Martin J. Bligh
2002-08-17  5:12                                           ` Martin J. Bligh [this message]
2002-08-17 17:02                                             ` aio-core why not using SuS? [Re: [rfc] aio-core for 2.5.29 (Re: async-io API registration for 2.5.29)] Linus Torvalds
2002-08-17 21:27                                               ` 32 bit arch with lots of RAM Martin J. Bligh
2002-08-22 16:30                                                 ` Andrea Arcangeli
2002-08-22 16:36                                                   ` Martin J. Bligh
2002-08-22 16:15                                               ` aio-core why not using SuS? [Re: [rfc] aio-core for 2.5.29 (Re: async-io API registration for 2.5.29)] Andrea Arcangeli
2002-08-22 16:12                                             ` Andrea Arcangeli
2002-08-20  0:35                                           ` Ingo Molnar
2002-08-17  4:36                                       ` William Lee Irwin III
2002-08-16  2:32                                 ` Rik van Riel
2002-08-16  2:32                               ` Andrea Arcangeli
2002-08-16  9:39                           ` Suparna Bhattacharya
2002-08-16 10:03                             ` Andrea Arcangeli
2002-08-16 11:23                               ` Suparna Bhattacharya
2002-08-16 11:28                                 ` Suparna Bhattacharya
2002-08-16 13:49                                   ` Dan Kegel
2002-09-02 18:40                                 ` Andrea Arcangeli
2002-09-03 12:04                                   ` aio-core in 2.5 - io_queue_wait and io_getevents Suparna Bhattacharya
2002-09-05  5:21                                   ` aio-core why not using SuS? [Re: [rfc] aio-core for 2.5.29 (Re: async-io API registration for 2.5.29)] Benjamin LaHaise
2002-08-16 13:43                             ` Dan Kegel
2002-08-16 14:21                               ` Jamie Lokier
2002-08-16 14:42                                 ` Benjamin LaHaise
2002-08-16 15:40                               ` John Gardiner Myers
2002-08-23 16:11                                 ` aio-core why not using SuS? [Re: [rfc] aio-core for 2.5.29 (Re:async-io " Dan Kegel
2002-08-16  1:53                         ` aio-core why not using SuS? [Re: [rfc] aio-core for 2.5.29 (Re: async-io " Dan Kegel
2002-08-01 19:18                     ` [rfc] aio-core for 2.5.29 (Re: async-io API registration for 2.5.29) Chris Wedgwood
2002-08-01 19:25                       ` Linus Torvalds
2002-08-01 19:31                         ` Chris Wedgwood
2002-08-02  8:24                     ` Pavel Machek
2002-08-02 11:59                       ` Alan Cox
2002-08-02 15:56                         ` Linus Torvalds
2002-07-31  1:20     ` async-io API registration for 2.5.29 Rik van Riel
2002-07-31  1:32       ` Andrea Arcangeli
2002-07-31  8:25         ` Christoph Hellwig
2002-07-31 13:19           ` Andrea Arcangeli
2002-07-30 13:34 ` Linus Torvalds
2002-07-30 16:49   ` Andrea Arcangeli

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='2159880183.1029535922@[10.10.2.3]' \
    --to=martin.bligh@us.ibm.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andrea@suse.de \
    --cc=bcrl@redhat.com \
    --cc=cfriesen@nortelnetworks.com \
    --cc=linux-aio@kvack.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@elf.ucw.cz \
    --cc=torvalds@transmeta.com \
    /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

all inboxes | Powered by JetHome®