]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sparc64: Add lightweight syscall mechanism for lwp_info
authorRob Gardner <rob.gardner@oracle.com>
Sun, 27 Mar 2016 22:39:13 +0000 (16:39 -0600)
committerAllen Pais <allen.pais@oracle.com>
Wed, 20 Apr 2016 16:30:22 +0000 (22:00 +0530)
commit9b68bba374f9c87adcc04d5b35daa9a0aa5af806
tree0778d93311ed415f05672353a95ed3760c41f8b2
parent19925ddb82ab4d10b9637e34a873cc77a98cbe19
sparc64: Add lightweight syscall mechanism for lwp_info

This patch introduces a new "light weight" system call
mechanism which has the ability to retrieve small bits
of information and/or perform minor computations without
the need for a full blown save/switch/restore context.

Solaris provides _lwp_info(), which returns basically the
same information as getrusage(RUSAGE_THREAD) but much faster.
This is used extensively by the database code, and returns
the utime and stime for the calling thread.

(This patch also provides a fast getcpu function just as
a demonstration of how additional calls might be added.
Unlike x86, there is no unprivileged instruction to do this,
and so it is a fairly expensive system call.)

Orabug: 22952506

Signed-off-by: Rob Gardner <rob.gardner@oracle.com>
arch/sparc/kernel/asm-offsets.c
arch/sparc/kernel/head_64.S
arch/sparc/kernel/lw_syscall.S [new file with mode: 0644]
arch/sparc/kernel/ttable_64.S