Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1341889

Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of running thread

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of running thread
Date 2016-02-24 12:20 +0100
Message-ID <r5FE7-3ID-43@gated-at.bofh.it> (permalink)
References <r5uyZ-4cb-5@gated-at.bofh.it> <r5uz0-4cb-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 23 Feb 2016, Mathieu Desnoyers wrote:
> +/*
> + * If parent process has a thread-local ABI, the child inherits. Only applies
> + * when forking a process, not a thread.
> + */
> +void getcpu_cache_fork(struct task_struct *t)
> +{
> +	t->cpu_cache = current->cpu_cache;
> +}
> +
> +void getcpu_cache_execve(struct task_struct *t)
> +{
> +	t->cpu_cache = NULL;
> +}
> +
> +void getcpu_cache_exit(struct task_struct *t)
> +{
> +	t->cpu_cache = NULL;
> +}

That's hardly worth a function call. Please inline.

> +/*
> + * sys_getcpu_cache - setup getcpu cache for caller thread
> + */
> +SYSCALL_DEFINE3(getcpu_cache, int, cmd, int32_t __user * __user *, cpu_cachep,
> +		int, flags)
> +{
> +	if (unlikely(flags))
> +		return -EINVAL;

New line for readability sake.

> +	switch (cmd) {
> +	case GETCPU_CACHE_GET:

Other than that: Reviewed-by: Thomas Gleixner <tglx@linutronix.de>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 1/5] getcpu_cache system call: cache CPU number of running thread Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2016-02-24 00:30 +0100
  Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Thomas Gleixner <tglx@linutronix.de> - 2016-02-24 12:20 +0100
    Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2016-02-24 18:20 +0100
    Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of running thread Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2016-02-26 00:40 +0100
      Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2016-02-26 18:50 +0100
  Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Peter Zijlstra <peterz@infradead.org> - 2016-02-25 11:00 +0100
    Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2016-02-25 18:00 +0100
      Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Peter Zijlstra <peterz@infradead.org> - 2016-02-25 18:10 +0100
        Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2016-02-25 18:20 +0100
          Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Peter Zijlstra <peterz@infradead.org> - 2016-02-26 12:40 +0100
            Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Thomas Gleixner <tglx@linutronix.de> - 2016-02-26 17:40 +0100
              Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2016-02-26 18:30 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Thomas Gleixner <tglx@linutronix.de> - 2016-02-26 19:10 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2016-02-26 21:30 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of running thread "H. Peter Anvin" <hpa@zytor.com> - 2016-02-27 00:10 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2016-02-27 01:50 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread "H. Peter Anvin" <hpa@zytor.com> - 2016-02-27 07:30 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2016-02-27 15:20 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Peter Zijlstra <peterz@infradead.org> - 2016-02-27 16:00 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Linus Torvalds <torvalds@linux-foundation.org> - 2016-02-27 19:40 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of running thread "H. Peter Anvin" <hpa@zytor.com> - 2016-02-27 20:10 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2016-02-28 01:00 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Linus Torvalds <torvalds@linux-foundation.org> - 2016-02-28 02:00 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2016-02-28 15:40 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Peter Zijlstra <peterz@infradead.org> - 2016-02-29 11:40 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2016-03-01 21:30 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Peter Zijlstra <peterz@infradead.org> - 2016-03-01 22:40 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Peter Zijlstra <peterz@infradead.org> - 2016-03-01 22:40 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread "H. Peter Anvin" <hpa@zytor.com> - 2016-03-01 23:00 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Peter Zijlstra <peterz@infradead.org> - 2016-03-02 11:40 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Peter Zijlstra <peterz@infradead.org> - 2016-02-29 11:40 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of running thread Arnd Bergmann <arnd@arndb.de> - 2016-02-29 11:50 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2016-02-29 13:50 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of running thread Arnd Bergmann <arnd@arndb.de> - 2016-02-29 14:20 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of running thread "H. Peter Anvin" <hpa@zytor.com> - 2016-02-29 19:30 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Geert Uytterhoeven <geert@linux-m68k.org> - 2016-03-02 11:50 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread "H. Peter Anvin" <hpa@zytor.com> - 2016-03-01 19:30 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2016-03-01 19:50 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Geert Uytterhoeven <geert@linux-m68k.org> - 2016-02-28 14:10 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Linus Torvalds <torvalds@linux-foundation.org> - 2016-02-28 17:30 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of  running thread Peter Zijlstra <peterz@infradead.org> - 2016-02-29 11:10 +0100
                Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of running thread "H. Peter Anvin" <hpa@zytor.com> - 2016-02-27 16:10 +0100

csiph-web