Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1190009
| From | Lai Jiangshan <jiangshanlai+lkml@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [Ksummit-discuss] [CORE TOPIC] lightweight per-cpu locks / restartable sequences |
| Date | 2015-07-22 16:30 +0200 |
| Message-ID | <pP3bY-YT-19@gated-at.bofh.it> (permalink) |
| References | <pKoTL-3En-9@gated-at.bofh.it> <pKpwt-48D-7@gated-at.bofh.it> <pKKhA-pQ-17@gated-at.bofh.it> <pLIGL-3rw-35@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Jul 13, 2015 at 5:57 PM, Peter Zijlstra <peterz@infradead.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 > > > 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. Anther down site is that all percpu ops can't call any function outside the section. Otherwise we would fail to detect whether it is a special region or be hard to detect it. If we disallow the percpu ops calling any function, I think we can insert some special instructions to the generated code along with a notation in a table (like exception table for copy_to_user()). So thus the interrupt only has to check the special instructions near the IP and confirm it by check it on the table. > >> 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@vger.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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [Ksummit-discuss] [CORE TOPIC] lightweight per-cpu locks / restartable sequences Christoph Lameter <cl@linux.com> - 2015-07-10 19:30 +0200
Re: [Ksummit-discuss] [CORE TOPIC] lightweight per-cpu locks / restartable sequences Peter Zijlstra <peterz@infradead.org> - 2015-07-13 12:00 +0200
Re: [Ksummit-discuss] [CORE TOPIC] lightweight per-cpu locks / restartable sequences Andy Lutomirski <luto@amacapital.net> - 2015-07-14 22:10 +0200
Re: [Ksummit-discuss] [CORE TOPIC] lightweight per-cpu locks / restartable sequences Lai Jiangshan <jiangshanlai+lkml@gmail.com> - 2015-07-22 16:30 +0200
Re: [Ksummit-discuss] [CORE TOPIC] lightweight per-cpu locks / restartable sequences Lai Jiangshan <jiangshanlai+lkml@gmail.com> - 2015-07-22 16:40 +0200
csiph-web