Re: [patch 1/1] uml: fixes performance regression in activate_mm and thus exec()
From: Blaisorblade
Date: Fri Aug 26 2005 - 10:09:34 EST
On Friday 12 August 2005 22:11, Benjamin LaHaise wrote:
> Is it possible to get an optimization for this case where uml can execute
> the kernel thread in the same process as it normally executes kernel mode
> for the given mm? AIO performance on uml is pretty bad when it has to
> access userspace.
I thought to another solution to that, i.e. use get_user_pages() and kmap()
the resulting pages, like other kernel threads do when accessing userspace
context.
However, by looking at the code (starting from aio_pread), maybe AIO reuses
too much normal I/O code to do this.
Actually, the changes wouldn't maybe be so intrusive, they're limited to
__generic_file_aio_read (conditionalize access_ok, and change the setup of
read_descriptor_t) and file_read_actor, plus the write side, plus anything
not using pagecache - generic_file_aio_read.
Having a different actor for AIO would work. The real problem is adding a
field to iovec to specify whether we're passing in a page array (given by
get_user_pages) rather than a void __user *, or passing an iovec "wrapper"
structure, which can carry either a normal iovec or the new kind of
descriptor.
However, this does not sound like too much added complexity. Instead, allowing
to move a kernel thread elsewhere on the host is a lot more difficult.
--
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade
___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/