[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJhGHyCXkAvZ+JygUfRizYthpO7-sMse68nLNVxpyLR-cd0k9w@mail.gmail.com>
Date: Wed, 22 Jul 2015 22:34:03 +0800
From: Lai Jiangshan <jiangshanlai+lkml@...il.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Christoph Lameter <cl@...ux.com>, Chris Mason <clm@...com>,
Andy Lutomirski <luto@...capital.net>,
"ksummit-discuss@...ts.linuxfoundation.org"
<ksummit-discuss@...ts.linuxfoundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Jens Axboe <axboe@...com>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Shaohua Li <shli@...com>
Subject: Re: [Ksummit-discuss] [CORE TOPIC] lightweight per-cpu locks /
restartable sequences
On Mon, Jul 13, 2015 at 5:57 PM, Peter Zijlstra <peterz@...radead.org> wrote:
> On Fri, Jul 10, 2015 at 12:26:21PM -0500, Christoph Lameter wrote:
>> On Thu, 9 Jul 2015, Chris Mason wrote:
>>
>> > I think the topic is really interesting and we'll be able to get numbers
>> > from production workloads to help justify and compare different
>> > approaches.
>>
>> Ok that would be important. I also think that the approach may be used
>> in kernel to reduce the overhead of CONFIG_PREEMPT and also to implement
>> fast versions of this_cpu_ops for non x86 architectures and maybe even
>
> There is nothing stopping people from trying this in-kernel, in fact
> that would be lots easier as we do not have to commit to any one
> specific ABI for that.
It also provides us a nicer way to fight with NMI and
to modify a slight-biger-struct irq-safely
if we have it in-kenrel.
>
> Also, I don't think we need a schedule check for the in-kernel usage,
> pure interrupt should be good enough, nobody should (want to) call
> schedule() while inside such a critical section, which leaves us with
> involuntary preemption, and those are purely interrupt driven.
>
> Now the 'problem' is finding these special regions fast, the easy
> solution is the same as the one proposed for userspace, one big section.
> That way the interrupt only has to check if the IP is inside this
> section which is minimal effort.
>
> The down side is that all percpu ops would then end up being full
> function calls. Which on some archs is indeed faster than disabling
> interrupts, but not by much I'm afraid.
>
>> optimize the x86 variants if interrupts also can detect critical sections
>> and restart at defined points.
>
> I really don't see how we can beat %GS prefixes with any such scheme.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists