LKML Archive on
 help / color / Atom feed
* Improve preempt-scheduling and x86 user access v3
@ 2013-08-16 21:17 Andi Kleen
  2013-08-16 21:17 ` [PATCH 1/6] x86: Add 1/2/4/8 byte optimization to 64bit __copy_{from,to}_user_inatomic Andi Kleen
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Andi Kleen @ 2013-08-16 21:17 UTC (permalink / raw)
  To: linux-kernel; +Cc: x86, peterz, akpm

Various optimizations related to CONFIG_PREEMPT_VOLUNTARY
and x86 uaccess

- Optimize copy_*_inatomic on x86-64 to handle 1-8 bytes 
without string instructions
- Inline might_sleep and other preempt code 
to optimize various preemption paths
This costs about 10k text size, but generates far better code
with less unnecessary function calls.

This patch kit is an attempt to get us back to sane code, 
mostly by doing proper inlining and doing sleep checks in the right
place. Unfortunately I had to add one tree sweep to avoid an nasty
include loop.

Unfortunately some of the inlining requires a tree sweep
for moving might_sleep and friends to sched.h

v2: Now completely remove reschedule checks for uaccess functions.
v3: Drop unnecessary changes (thanks Michael).
Now it only optimized copy_*_inatomic and inlines might_sleep()

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, back to index

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-16 21:17 Improve preempt-scheduling and x86 user access v3 Andi Kleen
2013-08-16 21:17 ` [PATCH 1/6] x86: Add 1/2/4/8 byte optimization to 64bit __copy_{from,to}_user_inatomic Andi Kleen
2013-09-10 23:30   ` [tip:x86/uaccess] x86: Add 1/2/4/ 8 " tip-bot for Andi Kleen
2013-08-16 21:17 ` [PATCH 2/6] x86: Include linux/sched.h in asm/uaccess.h Andi Kleen
2013-08-16 21:17 ` [PATCH 3/6] tree-sweep: Include linux/sched.h for might_sleep users Andi Kleen
2013-08-31 18:22   ` Geert Uytterhoeven
2013-09-10 23:52     ` Andrew Morton
2013-09-11  4:51       ` Andi Kleen
2013-09-11  5:36         ` Ingo Molnar
2013-08-16 21:17 ` [PATCH 4/6] Move might_sleep and friends from kernel.h to sched.h Andi Kleen
2013-08-27 23:50   ` Andrew Morton
2013-08-16 21:17 ` [PATCH 5/6] sched: mark should_resched() __always_inline Andi Kleen
2013-08-16 21:17 ` [PATCH 6/6] sched: Inline the need_resched test into the caller for _cond_resched Andi Kleen
2013-08-28  9:29 ` Improve preempt-scheduling and x86 user access v3 Ingo Molnar

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git
	git clone --mirror lkml/git/8.git
	git clone --mirror lkml/git/9.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone