From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9AFF8C43469 for ; Mon, 21 Sep 2020 16:25:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 41CDD235FD for ; Mon, 21 Sep 2020 16:25:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600705514; bh=2zhth20sOxhN1p8cwdA2Od/qjausM1RpGAwwr/eog2c=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=DH7x17qkZsrh2PrdHMIuAYYdrPayvVXVurT5cG+2EDYWIu2M+FJkuZQ6Pm3e9pesA Wps+Px1RgXtUQgclTvxWsZwFFKvpr4gDCZfED6A95htWhQXXiVIDxkjzAU0BKJHcfm le88AemwhI0qcmJRuXgu2OtL7omeUjjjwm40wejs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728382AbgIUQZN (ORCPT ); Mon, 21 Sep 2020 12:25:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727246AbgIUQZK (ORCPT ); Mon, 21 Sep 2020 12:25:10 -0400 Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D30A9C061755 for ; Mon, 21 Sep 2020 09:25:09 -0700 (PDT) Received: by mail-lf1-x144.google.com with SMTP id z17so14665972lfi.12 for ; Mon, 21 Sep 2020 09:25:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LbpMl5lO0+qWgp9uAKdYj5ux1bx38Si35gqGXl7ChFs=; b=a2Cw4ka1cjcNejUhLUZAAjSLNoYelCoyZSpmQCatftbiLw5qTc+pZIam7CQ+bzySoC gGOBNlZFILF1rbb13VR5vHbBB6o7IPhfhEtjuIQ55GiefDbPErJYqMNF7ag3KHBM9T1M Z1SXFFsw84dXXtq0Bg7SO0KF3jcdxFjvGihOo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LbpMl5lO0+qWgp9uAKdYj5ux1bx38Si35gqGXl7ChFs=; b=hk12V0tutVDgru9ZkNtdsO/Rt4N3K1Lk9rUdHKhpl9mh8ZKLf0oRk2COGz1vuxMG8Y thbG/a1GdVBCNXWQkLg9n9xoseofig87upthKtCWN2XNKOT5FEdJKu6cVAuEcrUGzdQw rOz6cqGeqJBcFmWbDqZ/LGigNx0VOduERxx9DiMK/RWnQ0hljm9fJpa3YX56p0jxdNXX aWAciRNbeeeki6qL3QGn+HCCuu0vt0opFAaLYBgSRGGwyCd6/OvQ9BNiYRgDbKrQ/d9i Nw70T2aa2z/eJWFqP162Dar3QgKCQUBtKfzhnxmLoydWV1kL2RLA5xqVAe4G13UjBzov JlNw== X-Gm-Message-State: AOAM5313Ovg3+CdkTzR4ce7xoAQPJ9PiMVvUvgOk+O7an2YB3aNO0fGc En/dYWyhQV9a3Q9MNMA0BfwdelE39RHAmw== X-Google-Smtp-Source: ABdhPJwTHSVimrNMLF2QyMSFPk+RYY/zKTKrHZEZ/HK3H2+sTfqWZL2H0r58gVrhTEP1QCIvxDcJnw== X-Received: by 2002:a19:8007:: with SMTP id b7mr231249lfd.84.1600705507931; Mon, 21 Sep 2020 09:25:07 -0700 (PDT) Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com. [209.85.208.175]) by smtp.gmail.com with ESMTPSA id 68sm2691617lfe.27.2020.09.21.09.25.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Sep 2020 09:25:02 -0700 (PDT) Received: by mail-lj1-f175.google.com with SMTP id s205so11601342lja.7 for ; Mon, 21 Sep 2020 09:25:02 -0700 (PDT) X-Received: by 2002:a2e:994a:: with SMTP id r10mr154392ljj.102.1600705501870; Mon, 21 Sep 2020 09:25:01 -0700 (PDT) MIME-Version: 1.0 References: <20200919091751.011116649@linutronix.de> <87mu1lc5mp.fsf@nanos.tec.linutronix.de> <87k0wode9a.fsf@nanos.tec.linutronix.de> <87eemwcpnq.fsf@nanos.tec.linutronix.de> <87a6xjd1dw.fsf@nanos.tec.linutronix.de> In-Reply-To: <87a6xjd1dw.fsf@nanos.tec.linutronix.de> From: Linus Torvalds Date: Mon, 21 Sep 2020 09:24:45 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends To: Thomas Gleixner Cc: LKML , linux-arch , Paul McKenney , "the arch/x86 maintainers" , Sebastian Andrzej Siewior , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Will Deacon , Andrew Morton , Linux-MM , Russell King , Linux ARM , Chris Zankel , Max Filippov , linux-xtensa@linux-xtensa.org, Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , intel-gfx , dri-devel , Ard Biesheuvel , Herbert Xu , Vineet Gupta , "open list:SYNOPSYS ARC ARCHITECTURE" , Arnd Bergmann , Guo Ren , linux-csky@vger.kernel.org, Michal Simek , Thomas Bogendoerfer , linux-mips@vger.kernel.org, Nick Hu , Greentime Hu , Vincent Chen , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev , "David S. Miller" , linux-sparc Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 21, 2020 at 12:39 AM Thomas Gleixner wrote: > > If a task is migrated to a different CPU then the mapping address will > change which will explode in colourful ways. Heh. Right you are. Maybe we really *could* call this new kmap functionality something like "kmap_percpu()" (or maybe "local" is good enough), and make it act like your RT code does for spinlocks - not disable preemption, but only disabling CPU migration. That would probably be good enough for a lot of users that don't want to expose excessive latencies, but where it's really not a huge deal to say "stick to this CPU for a short while". The crypto code certainly sounds like one such case. Linus From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Date: Mon, 21 Sep 2020 16:24:45 +0000 Subject: Re: [patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends Message-Id: List-Id: References: <20200919091751.011116649@linutronix.de> <87mu1lc5mp.fsf@nanos.tec.linutronix.de> <87k0wode9a.fsf@nanos.tec.linutronix.de> <87eemwcpnq.fsf@nanos.tec.linutronix.de> <87a6xjd1dw.fsf@nanos.tec.linutronix.de> In-Reply-To: <87a6xjd1dw.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Thomas Gleixner Cc: Juri Lelli , Peter Zijlstra , Sebastian Andrzej Siewior , dri-devel , linux-mips@vger.kernel.org, Ben Segall , Max Filippov , Guo Ren , linux-sparc , Vincent Chen , Will Deacon , Ard Biesheuvel , linux-arch , Vincent Guittot , Herbert Xu , Michael Ellerman , the arch/x86 maintainers , Russell King , linux-csky@vger.kernel.org, David Airlie , Mel Gorman , "open list:SYNOPSYS ARC ARCHITECTURE" , linux-xtensa@linux-xtensa.org, Paul McKenney , intel-gfx , linuxppc-dev , Steven Rostedt , Rodrigo Vivi , Dietmar Eggemann , Linux ARM , Chris Zankel , Michal Simek , Thomas Bogendoerfer , Nick Hu , Linux-MM , Vineet Gupta , LKML , Arnd Bergmann , Paul Mackerras , Andrew Morton , Daniel Bristot de Oliveira , "David S. Miller" , Greentime Hu On Mon, Sep 21, 2020 at 12:39 AM Thomas Gleixner wrote: > > If a task is migrated to a different CPU then the mapping address will > change which will explode in colourful ways. Heh. Right you are. Maybe we really *could* call this new kmap functionality something like "kmap_percpu()" (or maybe "local" is good enough), and make it act like your RT code does for spinlocks - not disable preemption, but only disabling CPU migration. That would probably be good enough for a lot of users that don't want to expose excessive latencies, but where it's really not a huge deal to say "stick to this CPU for a short while". The crypto code certainly sounds like one such case. Linus From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28082C43468 for ; Mon, 21 Sep 2020 16:30:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7BF3F23976 for ; Mon, 21 Sep 2020 16:30:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="a2Cw4ka1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7BF3F23976 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 00F70900093; Mon, 21 Sep 2020 12:30:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F014790008B; Mon, 21 Sep 2020 12:30:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DC97E900093; Mon, 21 Sep 2020 12:30:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0117.hostedemail.com [216.40.44.117]) by kanga.kvack.org (Postfix) with ESMTP id A9EF190008B for ; Mon, 21 Sep 2020 12:30:18 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 704388249980 for ; Mon, 21 Sep 2020 16:30:18 +0000 (UTC) X-FDA: 77287606116.15.chain52_20024fb27146 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin15.hostedemail.com (Postfix) with ESMTP id 76DDF1814B0DC for ; Mon, 21 Sep 2020 16:30:15 +0000 (UTC) X-HE-Tag: chain52_20024fb27146 X-Filterd-Recvd-Size: 6081 Received: from mail-ed1-f65.google.com (mail-ed1-f65.google.com [209.85.208.65]) by imf15.hostedemail.com (Postfix) with ESMTP for ; Mon, 21 Sep 2020 16:30:14 +0000 (UTC) Received: by mail-ed1-f65.google.com with SMTP id n13so13380417edo.10 for ; Mon, 21 Sep 2020 09:30:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LbpMl5lO0+qWgp9uAKdYj5ux1bx38Si35gqGXl7ChFs=; b=a2Cw4ka1cjcNejUhLUZAAjSLNoYelCoyZSpmQCatftbiLw5qTc+pZIam7CQ+bzySoC gGOBNlZFILF1rbb13VR5vHbBB6o7IPhfhEtjuIQ55GiefDbPErJYqMNF7ag3KHBM9T1M Z1SXFFsw84dXXtq0Bg7SO0KF3jcdxFjvGihOo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LbpMl5lO0+qWgp9uAKdYj5ux1bx38Si35gqGXl7ChFs=; b=muc/USQkUpKrUmWG3uq9BTtpWa+pI65r/MwCSYMdkdJPmGEepf0Dy86Zc+J8IuBE+U paJJNK7OD+bRof1oWK6krR9SkUkcjsOxjPSXxuYpZHVzlamjR+L9NRa+dAI1eRpirm4b wihJXVJZqtjroTaM0CjjKhYmdTgN//JKQqku37C0gdtFvIUgRiKJfJGdcGuVZihnp8VC VjhEqhgT4H+IAuXiX0AsGaPih6SoEEq8H9/PnwPte7xlmuF656OZG/tSWlks74ZABQkR cE3rhBQj3EiPyhqH4d564DghEksRuivM1S/apS8lQgpXRITYnAxeHECHDM+xWx0qmlpv cPSw== X-Gm-Message-State: AOAM531Va0s4oHc/CEJApXIk+Ko8j43MnXGCjbH6uK162DFpGmItOhDy n2N0qSP+ZvrPkMB/FkD90AhjH3p+PCv0qQ== X-Google-Smtp-Source: ABdhPJyr1Q36WMKrbeaLVIDhSWEhdSvlF7M6pCsBMNilPhR4c63WUdbzE/pHbfl38fmfeQq/unTH6w== X-Received: by 2002:a05:6402:1544:: with SMTP id p4mr476576edx.346.1600705813438; Mon, 21 Sep 2020 09:30:13 -0700 (PDT) Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com. [209.85.208.53]) by smtp.gmail.com with ESMTPSA id q12sm9135606edj.19.2020.09.21.09.30.12 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Sep 2020 09:30:13 -0700 (PDT) Received: by mail-ed1-f53.google.com with SMTP id e22so13448279edq.6 for ; Mon, 21 Sep 2020 09:30:12 -0700 (PDT) X-Received: by 2002:a2e:994a:: with SMTP id r10mr154392ljj.102.1600705501870; Mon, 21 Sep 2020 09:25:01 -0700 (PDT) MIME-Version: 1.0 References: <20200919091751.011116649@linutronix.de> <87mu1lc5mp.fsf@nanos.tec.linutronix.de> <87k0wode9a.fsf@nanos.tec.linutronix.de> <87eemwcpnq.fsf@nanos.tec.linutronix.de> <87a6xjd1dw.fsf@nanos.tec.linutronix.de> In-Reply-To: <87a6xjd1dw.fsf@nanos.tec.linutronix.de> From: Linus Torvalds Date: Mon, 21 Sep 2020 09:24:45 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends To: Thomas Gleixner Cc: LKML , linux-arch , Paul McKenney , "the arch/x86 maintainers" , Sebastian Andrzej Siewior , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Will Deacon , Andrew Morton , Linux-MM , Russell King , Linux ARM , Chris Zankel , Max Filippov , linux-xtensa@linux-xtensa.org, Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , intel-gfx , dri-devel , Ard Biesheuvel , Herbert Xu , Vineet Gupta , "open list:SYNOPSYS ARC ARCHITECTURE" , Arnd Bergmann , Guo Ren , linux-csky@vger.kernel.org, Michal Simek , Thomas Bogendoerfer , linux-mips@vger.kernel.org, Nick Hu , Greentime Hu , Vincent Chen , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev , "David S. Miller" , linux-sparc Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Sep 21, 2020 at 12:39 AM Thomas Gleixner wrote: > > If a task is migrated to a different CPU then the mapping address will > change which will explode in colourful ways. Heh. Right you are. Maybe we really *could* call this new kmap functionality something like "kmap_percpu()" (or maybe "local" is good enough), and make it act like your RT code does for spinlocks - not disable preemption, but only disabling CPU migration. That would probably be good enough for a lot of users that don't want to expose excessive latencies, but where it's really not a huge deal to say "stick to this CPU for a short while". The crypto code certainly sounds like one such case. Linus From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0C01C43469 for ; Mon, 21 Sep 2020 17:23:19 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2578A20888 for ; Mon, 21 Sep 2020 17:23:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="a2Cw4ka1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2578A20888 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4BwB9H6SGSzDqtp for ; Tue, 22 Sep 2020 03:23:15 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linuxfoundation.org (client-ip=2a00:1450:4864:20::144; helo=mail-lf1-x144.google.com; envelope-from=torvalds@linuxfoundation.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=google header.b=a2Cw4ka1; dkim-atps=neutral Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Bw90S5q6ZzDqVT for ; Tue, 22 Sep 2020 02:30:32 +1000 (AEST) Received: by mail-lf1-x144.google.com with SMTP id q8so14721662lfb.6 for ; Mon, 21 Sep 2020 09:30:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LbpMl5lO0+qWgp9uAKdYj5ux1bx38Si35gqGXl7ChFs=; b=a2Cw4ka1cjcNejUhLUZAAjSLNoYelCoyZSpmQCatftbiLw5qTc+pZIam7CQ+bzySoC gGOBNlZFILF1rbb13VR5vHbBB6o7IPhfhEtjuIQ55GiefDbPErJYqMNF7ag3KHBM9T1M Z1SXFFsw84dXXtq0Bg7SO0KF3jcdxFjvGihOo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LbpMl5lO0+qWgp9uAKdYj5ux1bx38Si35gqGXl7ChFs=; b=eG6L2yKv8Vn9Hg0iab6PgPADZJA/UXFWG/MF/ty9ifXSmEsSMiytEK1GWEMcnAimtJ drPszG41Gvbl/EHwDTKMpIjX4QHimlcKzxHXWg0n5EhU1zKg4vJ2OrZiVJnKzJhuaNOU QMDBNYQiKN0IivvL5Eje396TPZINOfNlGOnKsYcjkfyuvy0GXHvzBlg7PATvUKqw48EU wnprBUdTGC78gsmUaU/3Rod8HWhf3k5+kDdjUucrIOOB7ejgBNjU5MMqMctswAs00kEi iirr5SGYpne2h/N6sJqk34zm+dEZvQKDBzrUYhjeTypeB7eessy9GoOv68O+QB1rqvzD 8VRQ== X-Gm-Message-State: AOAM531FXC9ROZHpczTS0dh+ZKaZvaHfg/XCMaJciorHauQ7pyQchdOW 7QWLSIZKePhxjQxVRjr4Nq1hkyDjRaUY2g== X-Google-Smtp-Source: ABdhPJywXLnzlHLDhr5SaOaBQu9I9XbawTKirQDQtk06TXBqjaMzwLePSDtGRn0ftnPVSH20rvma7w== X-Received: by 2002:a05:6512:2101:: with SMTP id q1mr261275lfr.157.1600705825825; Mon, 21 Sep 2020 09:30:25 -0700 (PDT) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com. [209.85.167.54]) by smtp.gmail.com with ESMTPSA id y21sm2831787ljk.110.2020.09.21.09.30.25 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Sep 2020 09:30:25 -0700 (PDT) Received: by mail-lf1-f54.google.com with SMTP id y11so14732688lfl.5 for ; Mon, 21 Sep 2020 09:30:25 -0700 (PDT) X-Received: by 2002:a2e:994a:: with SMTP id r10mr154392ljj.102.1600705501870; Mon, 21 Sep 2020 09:25:01 -0700 (PDT) MIME-Version: 1.0 References: <20200919091751.011116649@linutronix.de> <87mu1lc5mp.fsf@nanos.tec.linutronix.de> <87k0wode9a.fsf@nanos.tec.linutronix.de> <87eemwcpnq.fsf@nanos.tec.linutronix.de> <87a6xjd1dw.fsf@nanos.tec.linutronix.de> In-Reply-To: <87a6xjd1dw.fsf@nanos.tec.linutronix.de> From: Linus Torvalds Date: Mon, 21 Sep 2020 09:24:45 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends To: Thomas Gleixner Content-Type: text/plain; charset="UTF-8" X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Juri Lelli , Peter Zijlstra , Sebastian Andrzej Siewior , Joonas Lahtinen , dri-devel , linux-mips@vger.kernel.org, Ben Segall , Max Filippov , Guo Ren , linux-sparc , Vincent Chen , Will Deacon , Ard Biesheuvel , linux-arch , Vincent Guittot , Herbert Xu , the arch/x86 maintainers , Russell King , linux-csky@vger.kernel.org, David Airlie , Mel Gorman , "open list:SYNOPSYS ARC ARCHITECTURE" , linux-xtensa@linux-xtensa.org, Paul McKenney , intel-gfx , linuxppc-dev , Steven Rostedt , Jani Nikula , Rodrigo Vivi , Dietmar Eggemann , Linux ARM , Chris Zankel , Michal Simek , Thomas Bogendoerfer , Nick Hu , Linux-MM , Vineet Gupta , LKML , Arnd Bergmann , Daniel Vetter , Paul Mackerras , Andrew Morton , Daniel Bristot de Oliveira , "David S. Miller" , Greentime Hu Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Mon, Sep 21, 2020 at 12:39 AM Thomas Gleixner wrote: > > If a task is migrated to a different CPU then the mapping address will > change which will explode in colourful ways. Heh. Right you are. Maybe we really *could* call this new kmap functionality something like "kmap_percpu()" (or maybe "local" is good enough), and make it act like your RT code does for spinlocks - not disable preemption, but only disabling CPU migration. That would probably be good enough for a lot of users that don't want to expose excessive latencies, but where it's really not a huge deal to say "stick to this CPU for a short while". The crypto code certainly sounds like one such case. Linus From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B7A6C43465 for ; Mon, 21 Sep 2020 16:31:55 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B46E923976 for ; Mon, 21 Sep 2020 16:31:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="k4AHlZK+"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="a2Cw4ka1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B46E923976 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Rj6673m+nScCNUucH9Jkfa2ytsGhaQP5nvIl4XPe+8A=; b=k4AHlZK+i1542obRxi4/3Mzpf M+d6qb2pHl0X1U3MeiPiJyxwlqJNpilNVye8VbE6auVmGhaU4uKxnw0Os91evZD6cuqKsZchvd2sL jVbsG+MHCsUtmMSC7i7ABzbHKU7tqc3nQna39rzmM/rkYQzldjL2hsYTaY3hRjCdWdGE/dU5oROSH bwJy29W09D4EAc3YPdSlsPttg5BJKc1WqYB7dXU3b9LIgeIYD+WkB9+N6Wq0kbhqO+E4aj+ETpXNG G/JNWXtQJw41VKGFXwaQfmWOr22vcnlij7vRQ0ZxNbU1PfHe6ak++ok2q+kK9CkQL/TBRAJZkvYHB qb4kjp60w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKOjJ-0008Jj-Rs; Mon, 21 Sep 2020 16:31:53 +0000 Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKOjE-0008Hu-Q2 for linux-snps-arc@lists.infradead.org; Mon, 21 Sep 2020 16:31:50 +0000 Received: by mail-ed1-x543.google.com with SMTP id c8so13449338edv.5 for ; Mon, 21 Sep 2020 09:31:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LbpMl5lO0+qWgp9uAKdYj5ux1bx38Si35gqGXl7ChFs=; b=a2Cw4ka1cjcNejUhLUZAAjSLNoYelCoyZSpmQCatftbiLw5qTc+pZIam7CQ+bzySoC gGOBNlZFILF1rbb13VR5vHbBB6o7IPhfhEtjuIQ55GiefDbPErJYqMNF7ag3KHBM9T1M Z1SXFFsw84dXXtq0Bg7SO0KF3jcdxFjvGihOo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LbpMl5lO0+qWgp9uAKdYj5ux1bx38Si35gqGXl7ChFs=; b=DJV/Ty4p9++gZeqjUxOGHpoMkam6s1ePV/WmY0AeurKEaP3hbL7sUyo6/DAjpTMhgO DHd6pPmdGSgaChDG9nJDjtMi2ixvTnMwBtUY2YRGCs9hT8vMtU8ugD8uGZj/ntcWnW3K a0+z2AQ8LQEs//cizDdjS4a1/QGWM7HBc7tPJFzp3ZHwl+r6x63xnD1YCheYsuqZ6eD1 LtJv6AI3auS0Ghd8dEfQPeuSxRpOpbcMv29goob0Y0eJn+A+KBjwkxbUrIL4SDmKEn59 AM68SFMXgPv8JwifpcOzFuHi2thq1eR+VpINyisd7GRlwKjsVZfViDh8NkXxFC5paKgA RYBQ== X-Gm-Message-State: AOAM531btP0WaEObM6QuuBK7KT0OWbUWpJlmY5YETecY0JrqAL95a1MH LpTUmdcRvKv4Og309XCWo/jUFfb5hBs/3g== X-Google-Smtp-Source: ABdhPJyu5PncbX6mkh6bt7G++nyj54RMWDG4TvCWRd9Tuq+fxE6kj8NPxfEJfBRki1serRqF9tidUA== X-Received: by 2002:a50:fc87:: with SMTP id f7mr510715edq.162.1600705907312; Mon, 21 Sep 2020 09:31:47 -0700 (PDT) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com. [209.85.221.44]) by smtp.gmail.com with ESMTPSA id i15sm9104592edf.82.2020.09.21.09.31.46 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Sep 2020 09:31:47 -0700 (PDT) Received: by mail-wr1-f44.google.com with SMTP id e16so13497617wrm.2 for ; Mon, 21 Sep 2020 09:31:46 -0700 (PDT) X-Received: by 2002:a2e:994a:: with SMTP id r10mr154392ljj.102.1600705501870; Mon, 21 Sep 2020 09:25:01 -0700 (PDT) MIME-Version: 1.0 References: <20200919091751.011116649@linutronix.de> <87mu1lc5mp.fsf@nanos.tec.linutronix.de> <87k0wode9a.fsf@nanos.tec.linutronix.de> <87eemwcpnq.fsf@nanos.tec.linutronix.de> <87a6xjd1dw.fsf@nanos.tec.linutronix.de> In-Reply-To: <87a6xjd1dw.fsf@nanos.tec.linutronix.de> From: Linus Torvalds Date: Mon, 21 Sep 2020 09:24:45 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends To: Thomas Gleixner X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200921_123148_867826_47DF8D5A X-CRM114-Status: GOOD ( 14.12 ) X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Juri Lelli , Peter Zijlstra , Benjamin Herrenschmidt , Sebastian Andrzej Siewior , Joonas Lahtinen , dri-devel , linux-mips@vger.kernel.org, Ben Segall , Max Filippov , Guo Ren , linux-sparc , Vincent Chen , Will Deacon , Ard Biesheuvel , linux-arch , Vincent Guittot , Herbert Xu , Michael Ellerman , the arch/x86 maintainers , Russell King , linux-csky@vger.kernel.org, David Airlie , Mel Gorman , "open list:SYNOPSYS ARC ARCHITECTURE" , linux-xtensa@linux-xtensa.org, Paul McKenney , intel-gfx , linuxppc-dev , Steven Rostedt , Jani Nikula , Rodrigo Vivi , Dietmar Eggemann , Linux ARM , Chris Zankel , Michal Simek , Thomas Bogendoerfer , Nick Hu , Linux-MM , Vineet Gupta , LKML , Arnd Bergmann , Daniel Vetter , Paul Mackerras , Andrew Morton , Daniel Bristot de Oliveira , "David S. Miller" , Greentime Hu Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org On Mon, Sep 21, 2020 at 12:39 AM Thomas Gleixner wrote: > > If a task is migrated to a different CPU then the mapping address will > change which will explode in colourful ways. Heh. Right you are. Maybe we really *could* call this new kmap functionality something like "kmap_percpu()" (or maybe "local" is good enough), and make it act like your RT code does for spinlocks - not disable preemption, but only disabling CPU migration. That would probably be good enough for a lot of users that don't want to expose excessive latencies, but where it's really not a huge deal to say "stick to this CPU for a short while". The crypto code certainly sounds like one such case. Linus _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BCAB5C43465 for ; Mon, 21 Sep 2020 16:26:39 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3772B2389F for ; Mon, 21 Sep 2020 16:26:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="I/FnuLPh"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="a2Cw4ka1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3772B2389F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xshyYCmr+Ne1/vI/6dqXHLaDjaC7h2SZp4ofyWZ9mPY=; b=I/FnuLPh9kFLC1nJCheKYsCTM 1WJz5ngxfwTM1UXarwZSJiY6JZ7mXmNnD5gDYJqhvS0r+fn68rjRpN95rrnrpqltT3XIuN3+sFmw6 kypPKdR5tlZa9Eank/omc3Ddo6z9p74cm5VTMLQST8QpHcOzw0OFeP1bLE0HU1bTG3dQ12j62GjgY b98KLd/LCcud8j3CEGJm5MMHCUjCpStabvcD28m7lGmrZKqxMRvbDSXWESwfy7S3S3UO+JYrhxtaQ YGsgb3nWFlupf+Cs9bPNIkY874Mqn2LikyqUzaCWTq7wHmD2PLZZHscF2bge4k2dZoPaotkGvS28B m0QhD7irA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKOcr-0006HK-EH; Mon, 21 Sep 2020 16:25:13 +0000 Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKOcn-0006FW-Rb for linux-arm-kernel@lists.infradead.org; Mon, 21 Sep 2020 16:25:11 +0000 Received: by mail-lj1-x241.google.com with SMTP id b19so11609825lji.11 for ; Mon, 21 Sep 2020 09:25:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LbpMl5lO0+qWgp9uAKdYj5ux1bx38Si35gqGXl7ChFs=; b=a2Cw4ka1cjcNejUhLUZAAjSLNoYelCoyZSpmQCatftbiLw5qTc+pZIam7CQ+bzySoC gGOBNlZFILF1rbb13VR5vHbBB6o7IPhfhEtjuIQ55GiefDbPErJYqMNF7ag3KHBM9T1M Z1SXFFsw84dXXtq0Bg7SO0KF3jcdxFjvGihOo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LbpMl5lO0+qWgp9uAKdYj5ux1bx38Si35gqGXl7ChFs=; b=AVrh5AgZpET98goHsYBqODUmzUgGFxibFx3NfZWfA0WBhQGkY3ppbApzlCZ8b8a/NW tfWpR1e8NLhBQgSuQeDgyo/597BiHA+MWcIz1CyjAoaQBrNBvjeXbOR1sbMZ6IHrddm5 eTWCXenB2//H6r7wgcE6+mxZ3cayjWSi0c7Y85y2qB+UU4nwxaBKOGFKkQBVeNjWNTl4 kYeH1yIwwXCOfyRALr9nxQnVL6fwkOIsClX89teI6wE9BTt43WrSDheaCV7TZVYxUZpN 9zCXD+Rh1GjzLIqZ0fktPaBfrVPnnGthdWEb9gyKC+wsRYzSM77CKzU8nW2udRVpyVqf FIUg== X-Gm-Message-State: AOAM530FuyIhV9lIaqeA20e/o5k4BYd7nyFNOhwYBV6im8BfO+ypC2Gm 7u9p9oPmZdKDhDCtFi1JPs4kjDeBtHhiCQ== X-Google-Smtp-Source: ABdhPJywVdiyTrmYQouW+9/b4BolXVB54uA9Ya7Ow08licbObf9vcDpsUC3hgRhZ4rC3loeZovg4JQ== X-Received: by 2002:a2e:a16e:: with SMTP id u14mr172167ljl.464.1600705507692; Mon, 21 Sep 2020 09:25:07 -0700 (PDT) Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com. [209.85.208.169]) by smtp.gmail.com with ESMTPSA id w4sm2665215lfq.75.2020.09.21.09.25.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Sep 2020 09:25:02 -0700 (PDT) Received: by mail-lj1-f169.google.com with SMTP id b19so11609548lji.11 for ; Mon, 21 Sep 2020 09:25:02 -0700 (PDT) X-Received: by 2002:a2e:994a:: with SMTP id r10mr154392ljj.102.1600705501870; Mon, 21 Sep 2020 09:25:01 -0700 (PDT) MIME-Version: 1.0 References: <20200919091751.011116649@linutronix.de> <87mu1lc5mp.fsf@nanos.tec.linutronix.de> <87k0wode9a.fsf@nanos.tec.linutronix.de> <87eemwcpnq.fsf@nanos.tec.linutronix.de> <87a6xjd1dw.fsf@nanos.tec.linutronix.de> In-Reply-To: <87a6xjd1dw.fsf@nanos.tec.linutronix.de> From: Linus Torvalds Date: Mon, 21 Sep 2020 09:24:45 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends To: Thomas Gleixner X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200921_122510_282181_6915D386 X-CRM114-Status: GOOD ( 15.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Juri Lelli , Peter Zijlstra , Benjamin Herrenschmidt , Sebastian Andrzej Siewior , Joonas Lahtinen , dri-devel , linux-mips@vger.kernel.org, Ben Segall , Max Filippov , Guo Ren , linux-sparc , Vincent Chen , Will Deacon , Ard Biesheuvel , linux-arch , Vincent Guittot , Herbert Xu , Michael Ellerman , the arch/x86 maintainers , Russell King , linux-csky@vger.kernel.org, David Airlie , Mel Gorman , "open list:SYNOPSYS ARC ARCHITECTURE" , linux-xtensa@linux-xtensa.org, Paul McKenney , intel-gfx , linuxppc-dev , Steven Rostedt , Jani Nikula , Rodrigo Vivi , Dietmar Eggemann , Linux ARM , Chris Zankel , Michal Simek , Thomas Bogendoerfer , Nick Hu , Linux-MM , Vineet Gupta , LKML , Arnd Bergmann , Daniel Vetter , Paul Mackerras , Andrew Morton , Daniel Bristot de Oliveira , "David S. Miller" , Greentime Hu Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Sep 21, 2020 at 12:39 AM Thomas Gleixner wrote: > > If a task is migrated to a different CPU then the mapping address will > change which will explode in colourful ways. Heh. Right you are. Maybe we really *could* call this new kmap functionality something like "kmap_percpu()" (or maybe "local" is good enough), and make it act like your RT code does for spinlocks - not disable preemption, but only disabling CPU migration. That would probably be good enough for a lot of users that don't want to expose excessive latencies, but where it's really not a huge deal to say "stick to this CPU for a short while". The crypto code certainly sounds like one such case. Linus _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10DC8C43468 for ; Mon, 21 Sep 2020 16:33:13 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B6F6D239A1 for ; Mon, 21 Sep 2020 16:33:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="a2Cw4ka1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B6F6D239A1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EDC94897D7; Mon, 21 Sep 2020 16:33:11 +0000 (UTC) Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) by gabe.freedesktop.org (Postfix) with ESMTPS id C0C7B897D7 for ; Mon, 21 Sep 2020 16:33:07 +0000 (UTC) Received: by mail-ej1-x641.google.com with SMTP id u21so18673248eja.2 for ; Mon, 21 Sep 2020 09:33:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LbpMl5lO0+qWgp9uAKdYj5ux1bx38Si35gqGXl7ChFs=; b=a2Cw4ka1cjcNejUhLUZAAjSLNoYelCoyZSpmQCatftbiLw5qTc+pZIam7CQ+bzySoC gGOBNlZFILF1rbb13VR5vHbBB6o7IPhfhEtjuIQ55GiefDbPErJYqMNF7ag3KHBM9T1M Z1SXFFsw84dXXtq0Bg7SO0KF3jcdxFjvGihOo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LbpMl5lO0+qWgp9uAKdYj5ux1bx38Si35gqGXl7ChFs=; b=q8Um0kCpR10voebCC3ipQahxfhVtvI4MTJBVkTHqoYDBLlviF/srHTiHBozDwhMQ07 8QXdWH+Y7LR59gdz9xUsHKv6Cf/0BxTNeGns02hSAzCHvdHciGJy1RA9uBZf8qjKDR+6 lTvZZ2WI79mzayFmRBuS+invw58+iXd/YZNJH4csu9T1oqsP00I+UU1xGxz6c70+ShNO gqmcnnVdy9Smz0S0jGnt4tjanTh96HGhrH+Ht9GR4FHaKvDWkPzuSWFgju2ImK7R6+YB YCYqW8iz86jsDQ1RKA26bR0XINlGUaWIDUVBI5rkqknU/ONDnkSS0yWd19NsvH9MXrTe qPkg== X-Gm-Message-State: AOAM531sGtP0NTAp3JaAfc1icj6L6RIdCaKxI9khCwbDo8S/DyMXO1Ld 1Dn6IPN9Cp4y04pMNMhl32zt+NTywmDJcA== X-Google-Smtp-Source: ABdhPJxIJSon2/4iQZIyJcQFJtIc6OqU5Z2mVQiWLEBbzGJlw5Eo2q+dZzHA9l4t0jDO2UwjNFE5KA== X-Received: by 2002:a17:906:4b41:: with SMTP id j1mr271677ejv.1.1600705986117; Mon, 21 Sep 2020 09:33:06 -0700 (PDT) Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com. [209.85.218.54]) by smtp.gmail.com with ESMTPSA id i3sm9259368edn.55.2020.09.21.09.33.05 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Sep 2020 09:33:05 -0700 (PDT) Received: by mail-ej1-f54.google.com with SMTP id q13so18605612ejo.9 for ; Mon, 21 Sep 2020 09:33:05 -0700 (PDT) X-Received: by 2002:a2e:994a:: with SMTP id r10mr154392ljj.102.1600705501870; Mon, 21 Sep 2020 09:25:01 -0700 (PDT) MIME-Version: 1.0 References: <20200919091751.011116649@linutronix.de> <87mu1lc5mp.fsf@nanos.tec.linutronix.de> <87k0wode9a.fsf@nanos.tec.linutronix.de> <87eemwcpnq.fsf@nanos.tec.linutronix.de> <87a6xjd1dw.fsf@nanos.tec.linutronix.de> In-Reply-To: <87a6xjd1dw.fsf@nanos.tec.linutronix.de> From: Linus Torvalds Date: Mon, 21 Sep 2020 09:24:45 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends To: Thomas Gleixner X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Juri Lelli , Peter Zijlstra , Sebastian Andrzej Siewior , dri-devel , linux-mips@vger.kernel.org, Ben Segall , Max Filippov , Guo Ren , linux-sparc , Vincent Chen , Will Deacon , Ard Biesheuvel , linux-arch , Vincent Guittot , Herbert Xu , Michael Ellerman , the arch/x86 maintainers , Russell King , linux-csky@vger.kernel.org, David Airlie , Mel Gorman , "open list:SYNOPSYS ARC ARCHITECTURE" , linux-xtensa@linux-xtensa.org, Paul McKenney , intel-gfx , linuxppc-dev , Steven Rostedt , Rodrigo Vivi , Dietmar Eggemann , Linux ARM , Chris Zankel , Michal Simek , Thomas Bogendoerfer , Nick Hu , Linux-MM , Vineet Gupta , LKML , Arnd Bergmann , Paul Mackerras , Andrew Morton , Daniel Bristot de Oliveira , "David S. Miller" , Greentime Hu Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon, Sep 21, 2020 at 12:39 AM Thomas Gleixner wrote: > > If a task is migrated to a different CPU then the mapping address will > change which will explode in colourful ways. Heh. Right you are. Maybe we really *could* call this new kmap functionality something like "kmap_percpu()" (or maybe "local" is good enough), and make it act like your RT code does for spinlocks - not disable preemption, but only disabling CPU migration. That would probably be good enough for a lot of users that don't want to expose excessive latencies, but where it's really not a huge deal to say "stick to this CPU for a short while". The crypto code certainly sounds like one such case. Linus _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48A10C43465 for ; Mon, 21 Sep 2020 16:30:27 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DE3EA2396D for ; Mon, 21 Sep 2020 16:30:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="a2Cw4ka1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DE3EA2396D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D86FA6E4FE; Mon, 21 Sep 2020 16:30:25 +0000 (UTC) Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7A22B6E4FE for ; Mon, 21 Sep 2020 16:30:21 +0000 (UTC) Received: by mail-lf1-x142.google.com with SMTP id w11so14754959lfn.2 for ; Mon, 21 Sep 2020 09:30:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LbpMl5lO0+qWgp9uAKdYj5ux1bx38Si35gqGXl7ChFs=; b=a2Cw4ka1cjcNejUhLUZAAjSLNoYelCoyZSpmQCatftbiLw5qTc+pZIam7CQ+bzySoC gGOBNlZFILF1rbb13VR5vHbBB6o7IPhfhEtjuIQ55GiefDbPErJYqMNF7ag3KHBM9T1M Z1SXFFsw84dXXtq0Bg7SO0KF3jcdxFjvGihOo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LbpMl5lO0+qWgp9uAKdYj5ux1bx38Si35gqGXl7ChFs=; b=NEVKYxpbiZ7zS/Sa8rqeG9PhSs0R+adtc1NICmjcBqvJojnc/QyQpOG1/lnW3KvUsQ q5SOxBp1j31jkp62oWXrPimTr+lQV4KlQk93Eh4JbCp0iNsmXVZBwcQ+Ayxu9bMmszoL eX7d8Q/bTViiwKbtqHCc0KQDCmtfOVR1BhFiqcBi27lFqBtuVB5SJRLQOZRAAr5k45J4 lJfgZmZODZUm0zJdiku4PZchnBGfChBCmyHHKJF8WGRfTZ+B8FDmXWd7O2HScKscP4gf B2EZmHtBOR836Bjgtxn187R5jPf6K2RefHGyCi7UoqdKSD4SV27G3zHFUmLe+wwVdoEI yK+A== X-Gm-Message-State: AOAM533UagFmUgX2ueHmmSO1bY1xocDUiUOrdfFdIGbbBnUyhE8Kv3R1 I1XOVS+XZRfvCZ7ML8eWC+bBqRKs7KgHmA== X-Google-Smtp-Source: ABdhPJwdbl0KeVhhFH5eGGXfR7Mrg7UJfK6Uxkjlj4RqYPxk1T7J6B9Nc5LhWRWLA8KsbxrxuIuDQg== X-Received: by 2002:ac2:54b4:: with SMTP id w20mr258036lfk.13.1600705819547; Mon, 21 Sep 2020 09:30:19 -0700 (PDT) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com. [209.85.167.51]) by smtp.gmail.com with ESMTPSA id u2sm1933571lff.255.2020.09.21.09.30.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Sep 2020 09:30:19 -0700 (PDT) Received: by mail-lf1-f51.google.com with SMTP id z19so14745778lfr.4 for ; Mon, 21 Sep 2020 09:30:19 -0700 (PDT) X-Received: by 2002:a2e:994a:: with SMTP id r10mr154392ljj.102.1600705501870; Mon, 21 Sep 2020 09:25:01 -0700 (PDT) MIME-Version: 1.0 References: <20200919091751.011116649@linutronix.de> <87mu1lc5mp.fsf@nanos.tec.linutronix.de> <87k0wode9a.fsf@nanos.tec.linutronix.de> <87eemwcpnq.fsf@nanos.tec.linutronix.de> <87a6xjd1dw.fsf@nanos.tec.linutronix.de> In-Reply-To: <87a6xjd1dw.fsf@nanos.tec.linutronix.de> From: Linus Torvalds Date: Mon, 21 Sep 2020 09:24:45 -0700 X-Gmail-Original-Message-ID: Message-ID: To: Thomas Gleixner Subject: Re: [Intel-gfx] [patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Juri Lelli , Peter Zijlstra , Benjamin Herrenschmidt , Sebastian Andrzej Siewior , dri-devel , linux-mips@vger.kernel.org, Ben Segall , Max Filippov , Guo Ren , linux-sparc , Vincent Chen , Will Deacon , Ard Biesheuvel , linux-arch , Herbert Xu , Michael Ellerman , the arch/x86 maintainers , Russell King , linux-csky@vger.kernel.org, David Airlie , Mel Gorman , "open list:SYNOPSYS ARC ARCHITECTURE" , linux-xtensa@linux-xtensa.org, Paul McKenney , intel-gfx , linuxppc-dev , Steven Rostedt , Dietmar Eggemann , Linux ARM , Chris Zankel , Michal Simek , Thomas Bogendoerfer , Nick Hu , Linux-MM , Vineet Gupta , LKML , Arnd Bergmann , Paul Mackerras , Andrew Morton , Daniel Bristot de Oliveira , "David S. Miller" , Greentime Hu Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Mon, Sep 21, 2020 at 12:39 AM Thomas Gleixner wrote: > > If a task is migrated to a different CPU then the mapping address will > change which will explode in colourful ways. Heh. Right you are. Maybe we really *could* call this new kmap functionality something like "kmap_percpu()" (or maybe "local" is good enough), and make it act like your RT code does for spinlocks - not disable preemption, but only disabling CPU migration. That would probably be good enough for a lot of users that don't want to expose excessive latencies, but where it's really not a huge deal to say "stick to this CPU for a short while". The crypto code certainly sounds like one such case. Linus _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx