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 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 C5699C43461 for ; Wed, 16 Sep 2020 18:39:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6A636206B5 for ; Wed, 16 Sep 2020 18:39:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="UEueMUHZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6A636206B5 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 E861F900006; Wed, 16 Sep 2020 14:39:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E36F4900002; Wed, 16 Sep 2020 14:39:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CFF44900006; Wed, 16 Sep 2020 14:39:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0085.hostedemail.com [216.40.44.85]) by kanga.kvack.org (Postfix) with ESMTP id B7B3C900002 for ; Wed, 16 Sep 2020 14:39:14 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 8399F824999B for ; Wed, 16 Sep 2020 18:39:14 +0000 (UTC) X-FDA: 77269787028.10.debt56_580e4dd2711c Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id 5724F16A0C3 for ; Wed, 16 Sep 2020 18:39:14 +0000 (UTC) X-HE-Tag: debt56_580e4dd2711c X-Filterd-Recvd-Size: 6780 Received: from mail-ed1-f67.google.com (mail-ed1-f67.google.com [209.85.208.67]) by imf06.hostedemail.com (Postfix) with ESMTP for ; Wed, 16 Sep 2020 18:39:13 +0000 (UTC) Received: by mail-ed1-f67.google.com with SMTP id n22so7470194edt.4 for ; Wed, 16 Sep 2020 11:39:13 -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=oa2KOKBruJIa8JzwEuXDvn8lq/AyW8Gh05WzKpjKQjk=; b=UEueMUHZ3w1bML4TffC03SPtwmMbG26ZS04QoHTBFtkbazq0zj1LMx+FyboyvzzASg nydFo8G58LEHhfHuiZfy7mbpmIDsIlzAJfeeTzYG6VJXbIqW/NS9VqvGKvKAt1o7QE3H aEBuUY03yHBMaYNPFFjhHL22z9bGvgl38mViw= 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=oa2KOKBruJIa8JzwEuXDvn8lq/AyW8Gh05WzKpjKQjk=; b=jiit4Nr8hrx1BuDMjtVuIDTwJJYhgp9xuTzB1yywiO+WLsqcshc3E03eWMNuCYipOp TB5JXjBxPTlZX2fP9iAXgqooAfkJacSQeHfnLBetWphXZdJzS9t7pEjBbZ1hZAzUZL+D gndS0unArx4InhQnqt6EfESbsP4gTQ2zh2H2h+TTJUwi97MahE18PARj0AgVkrfEDBPO GsPSZpMLdWFvv89rBOI3HZggwowySGCDgGOb/Q9cChmZ05WLezWYK8xyztOjI1kSX2T7 7WM6tvBTuxhjQ6kco2qF3mZQi5dXnpKLOQoF+1A43yCHH8+OYicaoRhikhPOPMAhzQ7U F00Q== X-Gm-Message-State: AOAM532KYOzeIM4wQ4HHCEK4mAC+CbYJOPZYQ33R+8zj/lyUQXZ65gft 5G/sHTs9/H1+D7qa3q6KnRUR2eq0Ir77oQ== X-Google-Smtp-Source: ABdhPJxMeQcdjqP21R2Apyr5cSIas+/fpzYTHodVFyJP8hkDgJbtdsipZPhGHCG8O3IoRPkYYsw2NA== X-Received: by 2002:a05:6402:1b9a:: with SMTP id cc26mr28500838edb.30.1600281551997; Wed, 16 Sep 2020 11:39:11 -0700 (PDT) Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com. [209.85.208.50]) by smtp.gmail.com with ESMTPSA id j10sm13070344ejf.116.2020.09.16.11.39.11 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Sep 2020 11:39:11 -0700 (PDT) Received: by mail-ed1-f50.google.com with SMTP id e22so7478808edq.6 for ; Wed, 16 Sep 2020 11:39:11 -0700 (PDT) X-Received: by 2002:a19:e00a:: with SMTP id x10mr9071213lfg.603.1600281136741; Wed, 16 Sep 2020 11:32:16 -0700 (PDT) MIME-Version: 1.0 References: <20200914204209.256266093@linutronix.de> <871rj4owfn.fsf@nanos.tec.linutronix.de> <87bli75t7v.fsf@nanos.tec.linutronix.de> <20200916152956.GV29330@paulmck-ThinkPad-P72> In-Reply-To: <20200916152956.GV29330@paulmck-ThinkPad-P72> From: Linus Torvalds Date: Wed, 16 Sep 2020 11:32:00 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch 00/13] preempt: Make preempt count unconditional To: "Paul E. McKenney" Cc: Daniel Vetter , Thomas Gleixner , Ard Biesheuvel , Herbert Xu , LKML , linux-arch , Sebastian Andrzej Siewior , Valentin Schneider , Richard Henderson , Ivan Kokshaysky , Matt Turner , alpha , Jeff Dike , Richard Weinberger , Anton Ivanov , linux-um , Brian Cain , linux-hexagon@vger.kernel.org, Geert Uytterhoeven , linux-m68k , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Will Deacon , Andrew Morton , Linux-MM , Ingo Molnar , Russell King , Linux ARM , Chris Zankel , Max Filippov , linux-xtensa@linux-xtensa.org, Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , intel-gfx , dri-devel , Josh Triplett , Mathieu Desnoyers , Lai Jiangshan , Shuah Khan , rcu@vger.kernel.org, "open list:KERNEL SELFTEST FRAMEWORK" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 5724F16A0C3 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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 Wed, Sep 16, 2020 at 8:29 AM Paul E. McKenney wrote: > > All fair, but some of us need to write code that must handle being > invoked from a wide variety of contexts. Note that I think that core functionality is different from random drivers. Of course core code can (and will) look at things like if (in_interrupt()) .. schedule work asynchronously .. because core code ends up being called from odd places, and code like that is expected to have understanding of the rules it plays with. But something like RCU is a very different beast from some "walk the scatter-gather list" code. RCU does its work in the background, and works with lots of different things. And it's so core and used everywhere that it knows about these things. I mean, we literally have special code explicitly to let RCU know "we entered kernel context now". But something like a driver list walking thing should not be doing different things behind peoples back depending on whether they hold spinlocks or not. It should either just work regardless, or there should be a flag (or special interface) for the "you're being called in a crtitical region". Because dynamically changing behavior really is very confusing. Linus