diff options
| author | Nick Piggin <[email protected]> | 2008-07-25 19:45:22 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2008-07-26 12:00:05 -0700 |
| commit | 21cc199baa815d7b3f1ace4be20b9558cbddc00f (patch) | |
| tree | eb4f3fa42a83613e2fe586b2555a811740952dce /tools/perf/scripts/python | |
| parent | a0a8f5364a5ad248aec6cb705e0092ff563edc2f (diff) | |
mm: introduce get_user_pages_fast
Introduce a new get_user_pages_fast mm API, which is basically a
get_user_pages with a less general API (but still tends to be suited to
the common case):
- task and mm are always current and current->mm
- force is always 0
- pages is always non-NULL
- don't pass back vmas
This restricted API can be implemented in a much more scalable way on many
architectures when the ptes are present, by walking the page tables
locklessly (no mmap_sem or page table locks). When the ptes are not
populated, get_user_pages_fast() could be slower.
This is implemented locklessly on x86, and used in some key direct IO call
sites, in later patches, which provides nearly 10% performance improvement
on a threaded database workload.
Lots of other code could use this too, depending on use cases (eg. grep
drivers/). And it might inspire some new and clever ways to use it.
[[email protected]: build fix]
[[email protected]: coding-style fixes]
Signed-off-by: Nick Piggin <[email protected]>
Cc: Dave Kleikamp <[email protected]>
Cc: Andy Whitcroft <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Dave Kleikamp <[email protected]>
Cc: Badari Pulavarty <[email protected]>
Cc: Zach Brown <[email protected]>
Cc: Jens Axboe <[email protected]>
Reviewed-by: Peter Zijlstra <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions