[Mesa-dev] [PATCH 1/2] RFC i965: Bypass a couple of libraries for syscall on x84_64

Emil Velikov emil.l.velikov at gmail.com
Mon Jun 19 11:43:42 UTC 2017


Hi Chris,

On 19 June 2017 at 12:32, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> On linux/x86_64, calling into the kernel is just a single instruction
> with the parameters passed via registers. We can therefre shortcircuit a
> couple of library indirections around ioctl() which as much as the
> switch into the kernel itself. Aside from the PLT indirection, libc's
> ioctl() has a slight impedance mismatch with the kernel interface in
> that it converts the -errno return into -1 + errno, which we immediately
> convert back into -errno for ourselves!
>
Did you measure any performance difference with this patch/series?
If so, please include the numbers in the commit message.

> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Kenneth Graunke <kenneth at whitecape.org>
> Cc: Matt Turner <mattst88 at gmail.com>
> Cc: Jason Ekstrand <jason.ekstrand at intel.com>
> ---
>  src/intel/common/sys_ioctl.h           | 37 +++++++++++++
Do include the file in src/intel/Makefile.sources's COMMON_FILES list.

Thanks
Emil


More information about the mesa-dev mailing list