From: Thomas Gleixner <tglx@linutronix.de>
To: Linus Torvalds <torvalds@linux-foundation.org>,
Herbert Xu <herbert@gondor.apana.org.au>
Cc: Juri Lelli <juri.lelli@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Lai Jiangshan <jiangshanlai@gmail.com>,
dri-devel <dri-devel@lists.freedesktop.org>,
Ben Segall <bsegall@google.com>, Linux-MM <linux-mm@kvack.org>,
linux-hexagon@vger.kernel.org, Will Deacon <will@kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Anton Ivanov <anton.ivanov@cambridgegreys.com>,
linux-arch <linux-arch@vger.kernel.org>,
Brian Cain <bcain@codeaurora.org>,
Richard Weinberger <richard@nod.at>,
Russell King <linux@armlinux.org.uk>,
Ard Biesheuvel <ardb@kernel.org>, David Airlie <airlied@linux.ie>,
Ingo Molnar <mingo@redhat.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Mel Gorman <mgorman@suse.de>,
intel-gfx <intel-gfx@lists.freedesktop.org>,
Matt Turner <mattst88@gmail.com>,
Valentin Schneider <valentin.schneider@arm.com>,
linux-xtensa@linux-xtensa.org, Shuah Khan <shuah@kernel.org>,
"Paul E. McKenney" <paulmck@kernel.org>,
Jeff Dike <jdike@addtoit.com>,
linux-um <linux-um@lists.infradead.org>,
Josh Triplett <josh@joshtriplett.org>,
Steven Rostedt <rostedt@goodmis.org>,
rcu@vger.kernel.org, linux-m68k <linux-m68k@lists.linux-m68k.org>,
Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
Richard Henderson <rth@twiddle.net>,
Chris Zankel <chris@zankel.net>,
Max Filippov <jcmvbkbc@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
alpha <linux-alpha@vger.kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Andrew Morton <akpm@linux-foundation.org>,
Daniel Bristot de Oliveira <bristot@redhat.com>
Subject: Re: [Intel-gfx] [patch 00/13] preempt: Make preempt count unconditional
Date: Tue, 15 Sep 2020 09:24:44 +0200 [thread overview]
Message-ID: <87een35woz.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <CAHk-=wir6LZ=4gHt8VDdASv=TmEMjEUONuzbt=s+DyXPCvxaBA@mail.gmail.com>
On Mon, Sep 14 2020 at 23:39, Linus Torvalds wrote:
> On Mon, Sep 14, 2020 at 11:24 PM Herbert Xu <herbert@gondor.apana.org.au> wrote:
>> > But another reason I tried to avoid kmap_atomic() is that it disables
>> > preemption unconditionally, even on 64-bit architectures where HIGHMEM
>> > is irrelevant. So using kmap_atomic() here means that the bulk of
>> > WireGuard packet encryption runs with preemption disabled, essentially
>> > for legacy reasons.
>>
>> Agreed. We should definitely fix that.
>
> Well, honestly, one big reason for that is debugging.
>
> The *semantics* of the kmap_atomic() is in the name - you can't sleep
> in between it and the kunmap_atomic().
>
> On any sane architecture, kmap_atomic() ends up being a no-op from an
> implementation standpoint, and sleeping would work just fine.
>
> But we very much want to make sure that people don't then write code
> that doesn't work on the bad old 32-bit machines where it really needs
> that sequence to be safe from preemption.
Alternatively we just make highmem a bit more expensive by making these
maps preemptible. RT is doing this for a long time and it's not that
horrible.
The approach is to keep track about the number of active maps in a task
and on an eventual context switch save them away in the task struct and
restore them when the task is scheduled back in.
Thanks,
tglx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-09-15 7:24 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-14 20:42 [Intel-gfx] [patch 00/13] preempt: Make preempt count unconditional Thomas Gleixner
2020-09-14 20:42 ` [Intel-gfx] [patch 01/13] lib/debug: Remove pointless ARCH_NO_PREEMPT dependencies Thomas Gleixner
2020-09-14 20:42 ` [Intel-gfx] [patch 02/13] preempt: Make preempt count unconditional Thomas Gleixner
2020-09-14 20:42 ` [Intel-gfx] [patch 03/13] preempt: Clenaup PREEMPT_COUNT leftovers Thomas Gleixner
2020-09-16 10:56 ` Valentin Schneider
2020-09-14 20:42 ` [Intel-gfx] [patch 04/13] lockdep: " Thomas Gleixner
2020-09-15 16:11 ` Will Deacon
2020-09-14 20:42 ` [Intel-gfx] [patch 05/13] mm/pagemap: " Thomas Gleixner
2020-09-14 20:42 ` [Intel-gfx] [patch 06/13] locking/bitspinlock: " Thomas Gleixner
2020-09-15 16:10 ` Will Deacon
2020-09-14 20:42 ` [Intel-gfx] [patch 07/13] uaccess: " Thomas Gleixner
2020-09-14 20:42 ` [Intel-gfx] [patch 08/13] sched: " Thomas Gleixner
2020-09-16 10:56 ` Valentin Schneider
2020-09-14 20:42 ` [Intel-gfx] [patch 09/13] ARM: " Thomas Gleixner
2020-09-14 20:42 ` [Intel-gfx] [patch 10/13] xtensa: " Thomas Gleixner
2020-09-14 20:42 ` [Intel-gfx] [patch 11/13] drm/i915: " Thomas Gleixner
2020-09-14 20:42 ` [Intel-gfx] [patch 12/13] rcutorture: " Thomas Gleixner
2020-09-14 20:42 ` [Intel-gfx] [patch 13/13] preempt: Remove PREEMPT_COUNT from Kconfig Thomas Gleixner
2020-09-14 20:54 ` [Intel-gfx] [patch 00/13] preempt: Make preempt count unconditional Steven Rostedt
2020-09-14 20:59 ` Linus Torvalds
2020-09-14 21:55 ` Thomas Gleixner
2020-09-14 22:24 ` Linus Torvalds
2020-09-14 22:37 ` Linus Torvalds
2020-09-15 3:21 ` [Intel-gfx] [PATCH] crypto: lib/chacha20poly1305 - Set SG_MITER_ATOMIC unconditionally Herbert Xu
2020-09-15 6:20 ` [Intel-gfx] [patch 00/13] preempt: Make preempt count unconditional Ard Biesheuvel
2020-09-15 6:22 ` Herbert Xu
2020-09-15 6:39 ` Linus Torvalds
2020-09-15 7:24 ` Thomas Gleixner [this message]
2020-09-15 17:29 ` Linus Torvalds
2020-09-15 8:39 ` Thomas Gleixner
2020-09-15 17:35 ` Linus Torvalds
2020-09-15 19:57 ` Thomas Gleixner
2020-09-16 18:34 ` Linus Torvalds
2020-09-16 7:37 ` Daniel Vetter
2020-09-16 15:29 ` Paul E. McKenney
2020-09-16 18:32 ` Linus Torvalds
2020-09-16 20:43 ` Paul E. McKenney
2020-09-17 6:38 ` Ard Biesheuvel
2020-09-16 20:29 ` Daniel Vetter
2020-09-16 20:58 ` Paul E. McKenney
2020-09-16 21:43 ` Daniel Vetter
2020-09-16 22:39 ` Paul E. McKenney
2020-09-17 7:52 ` Daniel Vetter
2020-09-17 16:28 ` Paul E. McKenney
2020-09-29 8:19 ` Michal Hocko
2020-09-29 8:19 ` Michal Hocko
2020-09-29 8:20 ` Michal Hocko
2020-09-29 8:21 ` Michal Hocko
2020-09-29 8:23 ` Michal Hocko
2020-09-29 9:00 ` Daniel Vetter
2020-09-29 14:54 ` Michal Hocko
2020-09-16 19:23 ` Matthew Wilcox
2020-09-16 20:48 ` Paul E. McKenney
2020-09-15 17:25 ` Paul E. McKenney
2020-09-14 22:01 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87een35woz.fsf@nanos.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=airlied@linux.ie \
--cc=akpm@linux-foundation.org \
--cc=anton.ivanov@cambridgegreys.com \
--cc=ardb@kernel.org \
--cc=bcain@codeaurora.org \
--cc=bigeasy@linutronix.de \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=chris@zankel.net \
--cc=dietmar.eggemann@arm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=geert@linux-m68k.org \
--cc=herbert@gondor.apana.org.au \
--cc=ink@jurassic.park.msu.ru \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jcmvbkbc@gmail.com \
--cc=jdike@addtoit.com \
--cc=jiangshanlai@gmail.com \
--cc=josh@joshtriplett.org \
--cc=juri.lelli@redhat.com \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-hexagon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-mm@kvack.org \
--cc=linux-um@lists.infradead.org \
--cc=linux-xtensa@linux-xtensa.org \
--cc=linux@armlinux.org.uk \
--cc=mathieu.desnoyers@efficios.com \
--cc=mattst88@gmail.com \
--cc=mgorman@suse.de \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=rcu@vger.kernel.org \
--cc=richard@nod.at \
--cc=rostedt@goodmis.org \
--cc=rth@twiddle.net \
--cc=shuah@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=valentin.schneider@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox