Re: [POC][RFC][PATCH v2] sched: Extended Scheduler Time Slice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 26 Oct 2023 at 08:36, Mathieu Desnoyers
<mathieu.desnoyers@xxxxxxxxxxxx> wrote:
>
> >       asm volatile("xchg %b0,%1"
>
> which has an implicit lock prefix (xchg with a memory operand is a
> special-case):

Yeah, this is why we do "percpu_xchg()" - which does not want locked
semantics - as a "cmpxchg" loop.

Steven, check out

    arch/x86/include/asm/percpu.h

for a rough implementation of a 'xchg()' without SMP coherency, just
cpu-local one (ie atomic wrt being preempted by the kernel, but not
atomic wrt other CPU's accessing the same variable concurrently)

             Linus




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux