lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180323180534.GD4043@hirez.programming.kicks-ass.net>
Date:   Fri, 23 Mar 2018 19:05:34 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Alexey Budankov <alexey.budankov@...ux.intel.com>
Cc:     Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH v2 0/3] perf/core: expose thread context switch out event
 type to user space

On Thu, Mar 22, 2018 at 07:08:25PM +0300, Alexey Budankov wrote:
> 
> Implementation of exposing context-switch-out type event as a part 
> of PERF_RECORD_SWITCH[_CPU_WIDE] record.
> 
> Introduced types of events assumed to be:
> a) preempt: when task->state == TASK_RUNNING
> b) yield: !preempt, encoding is done using new bit 
>    PERF_RECORD_MISC_SWITCH_OUT_YIELD like this:

A !preempt context switch isn't nessecarily a yield; please don't use
that name, it means something quite specific and this isn't it.

Specifically, on Linux yield() doesn't actually change task->state, so
when task->state is set !0 it _cannot_ have been yield.

I would invert the thing and call the preempt one SWITCH_OUT_PREEMPT.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ