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 09D17C433E2 for ; Mon, 14 Sep 2020 21:06:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 82FA5208B3 for ; Mon, 14 Sep 2020 21:06:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="ERO6mM2H" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 82FA5208B3 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 CCE22900002; Mon, 14 Sep 2020 17:06:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C57C18E0001; Mon, 14 Sep 2020 17:06:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B1F11900002; Mon, 14 Sep 2020 17:06:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0093.hostedemail.com [216.40.44.93]) by kanga.kvack.org (Postfix) with ESMTP id 985718E0001 for ; Mon, 14 Sep 2020 17:06:49 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 56AE712FF for ; Mon, 14 Sep 2020 21:06:49 +0000 (UTC) X-FDA: 77262901338.09.hot41_0f0675a2710b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin09.hostedemail.com (Postfix) with ESMTP id 2936A180AD804 for ; Mon, 14 Sep 2020 21:06:49 +0000 (UTC) X-HE-Tag: hot41_0f0675a2710b X-Filterd-Recvd-Size: 5797 Received: from mail-ed1-f65.google.com (mail-ed1-f65.google.com [209.85.208.65]) by imf09.hostedemail.com (Postfix) with ESMTP for ; Mon, 14 Sep 2020 21:06:48 +0000 (UTC) Received: by mail-ed1-f65.google.com with SMTP id k14so997991edo.1 for ; Mon, 14 Sep 2020 14:06: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=9Qs78FMzlt+im4GrVUJu3esmNYK1MSMDWWoqgBiwThs=; b=ERO6mM2HDltE439vWz9d9wZL1Z1US74Rep2fFSqw78LuIb7lPia7EGvlr1OC0CVjXq SMHEUg44TyaQk6ZJLSPy2HsSiKOu/iozCQgjKu5X4wpxZiRqxlsnhy+mopIISbxgK1FP TMlpT1uLwxNI5kovsL0EwxutKi15MuXbWCbt0= 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=9Qs78FMzlt+im4GrVUJu3esmNYK1MSMDWWoqgBiwThs=; b=kAPm/NOCAG0GFCaeEXHD2LHF2IaqZbBoBP+rESQoelKN3cRHHcoZd32IuaAhqbygFu +BjpXxQFM3FVsjX+GwbYIBUe4pUXNOlYz7y64gwsucQH2vjL7zeCBN4MDr3qfTkmD0Ss JcNwJDEMP+9kDMm4EOy+mK6tl8yQFgbCav28n9SpEUFKu88smNAxpftfXto+lisRw2v1 IwIcPPAEz4TO7JxzrT2JkIqZSJ94q3URolJBrZc33Cw4RLIyVcImaBUX+5IUIRjZbv8X m1UnvtrcQXKCNobw7powDEqITcV4mEq2IBglPI7ucgtKWlODwv9Sq3+6PB/klmVYPryT iTYw== X-Gm-Message-State: AOAM533wOuMW2OpisKqEnSBQ9x6+RWxjgc4ASp+hBy/1P8KvVaxoVBCW rdtMOWdq11l7H/3y2zFLdMrezCrCuXiGiA== X-Google-Smtp-Source: ABdhPJz6Oeglli7l+7P4NPsUz9r4paXQB/clIUapQqwzizYFH9nlaLXuVLgsLWDcxIuplts4bb46eA== X-Received: by 2002:aa7:c1c3:: with SMTP id d3mr19405830edp.228.1600117606884; Mon, 14 Sep 2020 14:06:46 -0700 (PDT) Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com. [209.85.218.45]) by smtp.gmail.com with ESMTPSA id r8sm10036556edy.87.2020.09.14.14.06.46 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Sep 2020 14:06:46 -0700 (PDT) Received: by mail-ej1-f45.google.com with SMTP id r7so1909528ejs.11 for ; Mon, 14 Sep 2020 14:06:46 -0700 (PDT) X-Received: by 2002:a2e:91cd:: with SMTP id u13mr5091065ljg.421.1600117171599; Mon, 14 Sep 2020 13:59:31 -0700 (PDT) MIME-Version: 1.0 References: <20200914204209.256266093@linutronix.de> In-Reply-To: <20200914204209.256266093@linutronix.de> From: Linus Torvalds Date: Mon, 14 Sep 2020 13:59:15 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch 00/13] preempt: Make preempt count unconditional To: Thomas Gleixner Cc: 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 , Daniel Vetter , intel-gfx , dri-devel , "Paul E. McKenney" , 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: 2936A180AD804 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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 14, 2020 at 1:45 PM Thomas Gleixner wrote: > > Recently merged code does: > > gfp = preemptible() ? GFP_KERNEL : GFP_ATOMIC; > > Looks obviously correct, except for the fact that preemptible() is > unconditionally false for CONFIF_PREEMPT_COUNT=n, i.e. all allocations in > that code use GFP_ATOMIC on such kernels. I don't think this is a good reason to entirely get rid of the no-preempt thing. The above is just garbage. It's bogus. You can't do it. Blaming the no-preempt code for this bug is extremely unfair, imho. And the no-preempt code does help make for much better code generation for simple spinlocks. Where is that horribly buggy recent code? It's not in that exact format, certainly, since 'grep' doesn't find it. 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.5 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 26B19C43461 for ; Mon, 14 Sep 2020 21:08:15 +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 C9828208B3 for ; Mon, 14 Sep 2020 21:08:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jpxq5kXa"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="ERO6mM2H" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C9828208B3 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=N9XV5RJxJqp+XvdWlHSTxPG3wRLL6KbiLxB0pS4d1Qs=; b=jpxq5kXaFsEwJ0M2yKxBk4c8c ZdhUp6tr/xZ65uDkMNhigo8gTAAzAsMQOEjnnEQNAzm2xnn2f3OIbg/wfv2VHGUPTnoo5b/LMzEo2 k0p6xFhetUPNz+JRJyUnxdKpgPS4s9AsSMWkmuzVtR7vLGTCblP0PbJD+pIyNFsBp6pXTPYqFfnbi V/YjwOlxBCeGzaO1Xh3xO7PKYZd2v7rCPNTqtzhNSUlDAnE59Xs5S2rqI6axqFfYfoEHrGUSv5yJL BB9BZGVcQ4thwhmyli2w2NhTojyZ74KmmSeHPY65QCMsyyAUPATvroEU+LZ1c0ceE3xWnMMdm/sZ5 0AEJw7m9Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHvfy-0007xw-Fu; Mon, 14 Sep 2020 21:06:16 +0000 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHvfq-0007xZ-4O for linux-arm-kernel@lists.infradead.org; Mon, 14 Sep 2020 21:06:08 +0000 Received: by mail-lj1-x242.google.com with SMTP id a15so924905ljk.2 for ; Mon, 14 Sep 2020 14:06:05 -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=9Qs78FMzlt+im4GrVUJu3esmNYK1MSMDWWoqgBiwThs=; b=ERO6mM2HDltE439vWz9d9wZL1Z1US74Rep2fFSqw78LuIb7lPia7EGvlr1OC0CVjXq SMHEUg44TyaQk6ZJLSPy2HsSiKOu/iozCQgjKu5X4wpxZiRqxlsnhy+mopIISbxgK1FP TMlpT1uLwxNI5kovsL0EwxutKi15MuXbWCbt0= 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=9Qs78FMzlt+im4GrVUJu3esmNYK1MSMDWWoqgBiwThs=; b=pA0KhdSvpzPdqkew3MfHZTM+GX5Pbt+uIqYx6ttNXirWZkKKCT++AuKImM21ubobBL 3lbD4L0Fg/PBGU0EoUEZ2f0VCCD0/J0+IWBZlb59rwv0hb/MELnDgqqT1U78STaMJUj9 RDxMBbVP/9dKL/xasmhX4vnZHX0Ts+3nRzL7/TmWkHClqwyNoX+EWRzyDUEUTGcvPSwv TaAoFjsJNC5kvuzqbTuE/kDiO0cgX4zmwE2IVAPU7aY+X/uxMeYq3C52UbhQzrmlzEDh tA92Fxo5kUBBSFTdqEIR9PHq1CQQaIm1GelFhfXhseiSI/XAhlLAgVzHXptHExWWe1vo D/AA== X-Gm-Message-State: AOAM530kqsKxqZC8ffGNF+By3NAQbsthT1RhXDD88eTMFTm2zD7TdiYb ngPm6PlZAQM3RswFK0DZ0otREuniGlAP/Q== X-Google-Smtp-Source: ABdhPJxrciTu+kqIjkdZWRVgyh19RINGDczB18aafN+u32xzNIBxjx/umyfDBlbJ6mGHa9MC4Cxfug== X-Received: by 2002:a2e:4b12:: with SMTP id y18mr2812515lja.330.1600117564329; Mon, 14 Sep 2020 14:06:04 -0700 (PDT) Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com. [209.85.208.172]) by smtp.gmail.com with ESMTPSA id 78sm3142163lfi.81.2020.09.14.14.06.03 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Sep 2020 14:06:04 -0700 (PDT) Received: by mail-lj1-f172.google.com with SMTP id a22so857672ljp.13 for ; Mon, 14 Sep 2020 14:06:03 -0700 (PDT) X-Received: by 2002:a2e:91cd:: with SMTP id u13mr5091065ljg.421.1600117171599; Mon, 14 Sep 2020 13:59:31 -0700 (PDT) MIME-Version: 1.0 References: <20200914204209.256266093@linutronix.de> In-Reply-To: <20200914204209.256266093@linutronix.de> From: Linus Torvalds Date: Mon, 14 Sep 2020 13:59:15 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch 00/13] preempt: Make preempt count unconditional To: Thomas Gleixner X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200914_170606_350211_C4C12FCA X-CRM114-Status: GOOD ( 16.85 ) 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 , Sebastian Andrzej Siewior , Joonas Lahtinen , Lai Jiangshan , dri-devel , Ben Segall , Linux-MM , "open list:KERNEL SELFTEST FRAMEWORK" , linux-hexagon@vger.kernel.org, Will Deacon , Ingo Molnar , Anton Ivanov , linux-arch , Vincent Guittot , Brian Cain , Richard Weinberger , Russell King , David Airlie , Ingo Molnar , Geert Uytterhoeven , Mel Gorman , intel-gfx , Matt Turner , Valentin Schneider , linux-xtensa@linux-xtensa.org, Shuah Khan , "Paul E. McKenney" , Jeff Dike , linux-um , Josh Triplett , Steven Rostedt , rcu@vger.kernel.org, linux-m68k , Ivan Kokshaysky , Jani Nikula , Rodrigo Vivi , Dietmar Eggemann , Linux ARM , Richard Henderson , Chris Zankel , Max Filippov , LKML , Daniel Vetter , alpha , Mathieu Desnoyers , Andrew Morton , Daniel Bristot de Oliveira 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 14, 2020 at 1:45 PM Thomas Gleixner wrote: > > Recently merged code does: > > gfp = preemptible() ? GFP_KERNEL : GFP_ATOMIC; > > Looks obviously correct, except for the fact that preemptible() is > unconditionally false for CONFIF_PREEMPT_COUNT=n, i.e. all allocations in > that code use GFP_ATOMIC on such kernels. I don't think this is a good reason to entirely get rid of the no-preempt thing. The above is just garbage. It's bogus. You can't do it. Blaming the no-preempt code for this bug is extremely unfair, imho. And the no-preempt code does help make for much better code generation for simple spinlocks. Where is that horribly buggy recent code? It's not in that exact format, certainly, since 'grep' doesn't find it. 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 7A352C433E2 for ; Mon, 14 Sep 2020 21:07:37 +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 30B6C208B3 for ; Mon, 14 Sep 2020 21:07:36 +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="ERO6mM2H" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 30B6C208B3 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 5CCCB6E5CA; Mon, 14 Sep 2020 21:07:36 +0000 (UTC) Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7D2996E5CA for ; Mon, 14 Sep 2020 21:07:35 +0000 (UTC) Received: by mail-ej1-x643.google.com with SMTP id j11so2031867ejk.0 for ; Mon, 14 Sep 2020 14:07:35 -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=9Qs78FMzlt+im4GrVUJu3esmNYK1MSMDWWoqgBiwThs=; b=ERO6mM2HDltE439vWz9d9wZL1Z1US74Rep2fFSqw78LuIb7lPia7EGvlr1OC0CVjXq SMHEUg44TyaQk6ZJLSPy2HsSiKOu/iozCQgjKu5X4wpxZiRqxlsnhy+mopIISbxgK1FP TMlpT1uLwxNI5kovsL0EwxutKi15MuXbWCbt0= 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=9Qs78FMzlt+im4GrVUJu3esmNYK1MSMDWWoqgBiwThs=; b=tV02TrW1iY9n5B5pO6f/5Yqb47RONJMvyTUQz8hZl6M9MxwWSV5MjEgxk3lMEUuNnF UQr14fgfW/NLX7o1Vqlm9/1AA4B7T4O5mYLkDEf+zNmoxLYzS70RhztNTulFVPi+kbN/ hdWLRb+5m2TVpSMJkyOSdaSO8Gnw6FrtU6eZuheK+8gvWJv9jm80Oo+8mWiSTKmzbYdS ZHFv5R4wkHDxYJ2g7GucyiejxWfBkz8/ujkUWFZSEeUesfgiKKiIkPPbKoDzDeo3Emba 2o0xF5U8XHqSTWSK1oSowZZF5xBWLO3w66LJIuveemr+BD7taBmluUydgqZL9VEJAea7 UW1Q== X-Gm-Message-State: AOAM5325cUQ0/P/3HEOjOUhqWMmkCbRXjaOpno+HyUXoPW4pm3dRAOaP AWHyVAXLQ/LkmMZFMWFqcmKMiBDIVmnl8w== X-Google-Smtp-Source: ABdhPJygdP/eRKtmMbf4GtFYbzF1xAsy6Zu43T70p+eyFnrbMK5DNEAgyE5DkUlH1aI2Jg2nhh848g== X-Received: by 2002:a17:907:110f:: with SMTP id qu15mr17319905ejb.359.1600117653951; Mon, 14 Sep 2020 14:07:33 -0700 (PDT) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com. [209.85.221.42]) by smtp.gmail.com with ESMTPSA id v18sm10050850edb.26.2020.09.14.14.07.33 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Sep 2020 14:07:33 -0700 (PDT) Received: by mail-wr1-f42.google.com with SMTP id e16so1113654wrm.2 for ; Mon, 14 Sep 2020 14:07:33 -0700 (PDT) X-Received: by 2002:a2e:91cd:: with SMTP id u13mr5091065ljg.421.1600117171599; Mon, 14 Sep 2020 13:59:31 -0700 (PDT) MIME-Version: 1.0 References: <20200914204209.256266093@linutronix.de> In-Reply-To: <20200914204209.256266093@linutronix.de> From: Linus Torvalds Date: Mon, 14 Sep 2020 13:59:15 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch 00/13] preempt: Make preempt count unconditional 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 , Lai Jiangshan , dri-devel , Ben Segall , Linux-MM , "open list:KERNEL SELFTEST FRAMEWORK" , linux-hexagon@vger.kernel.org, Will Deacon , Ingo Molnar , Anton Ivanov , linux-arch , Vincent Guittot , Brian Cain , Richard Weinberger , Russell King , David Airlie , Ingo Molnar , Geert Uytterhoeven , Mel Gorman , intel-gfx , Matt Turner , Valentin Schneider , linux-xtensa@linux-xtensa.org, Shuah Khan , "Paul E. McKenney" , Jeff Dike , linux-um , Josh Triplett , Steven Rostedt , rcu@vger.kernel.org, linux-m68k , Ivan Kokshaysky , Rodrigo Vivi , Dietmar Eggemann , Linux ARM , Richard Henderson , Chris Zankel , Max Filippov , LKML , alpha , Mathieu Desnoyers , Andrew Morton , Daniel Bristot de Oliveira 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 14, 2020 at 1:45 PM Thomas Gleixner wrote: > > Recently merged code does: > > gfp = preemptible() ? GFP_KERNEL : GFP_ATOMIC; > > Looks obviously correct, except for the fact that preemptible() is > unconditionally false for CONFIF_PREEMPT_COUNT=n, i.e. all allocations in > that code use GFP_ATOMIC on such kernels. I don't think this is a good reason to entirely get rid of the no-preempt thing. The above is just garbage. It's bogus. You can't do it. Blaming the no-preempt code for this bug is extremely unfair, imho. And the no-preempt code does help make for much better code generation for simple spinlocks. Where is that horribly buggy recent code? It's not in that exact format, certainly, since 'grep' doesn't find it. 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 031B3C433E2 for ; Mon, 14 Sep 2020 21:07:14 +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 8BB34208B3 for ; Mon, 14 Sep 2020 21:07:13 +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="ERO6mM2H" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8BB34208B3 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 DC3DC6E5C5; Mon, 14 Sep 2020 21:07:12 +0000 (UTC) Received: from mail-ej1-x642.google.com (mail-ej1-x642.google.com [IPv6:2a00:1450:4864:20::642]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2A2786E5C5 for ; Mon, 14 Sep 2020 21:07:11 +0000 (UTC) Received: by mail-ej1-x642.google.com with SMTP id e23so1979551eja.3 for ; Mon, 14 Sep 2020 14:07:11 -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=9Qs78FMzlt+im4GrVUJu3esmNYK1MSMDWWoqgBiwThs=; b=ERO6mM2HDltE439vWz9d9wZL1Z1US74Rep2fFSqw78LuIb7lPia7EGvlr1OC0CVjXq SMHEUg44TyaQk6ZJLSPy2HsSiKOu/iozCQgjKu5X4wpxZiRqxlsnhy+mopIISbxgK1FP TMlpT1uLwxNI5kovsL0EwxutKi15MuXbWCbt0= 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=9Qs78FMzlt+im4GrVUJu3esmNYK1MSMDWWoqgBiwThs=; b=lpvlRNcD/qgM5LAlNqTjb0Zxi8IcKsfjq3qcxpseqp6GyRypmvgXepbXHoVgRVLofU 5NaYSI9oEGo2EbfIHybPSTxhBmWg6GPy8+PgCYw2TQrAXh2Das4YBsLD6WITml4aWLEI pugoNwQptOBCzadSzo6qEnTzZPeC17KkvVINBjf15+cqAWLJPAy2Fa1ceLAztIStJPOf kwJTlrYCyO37Xqf0t8Lrr/5czut22TM83L1S85XvIeGU4FzNsMA9zchoikszfh2IIsCs 3uTyBp3Jl2ArplO/HkUOuEgivieDJelsxcGhT6giOq5ZCXZzg2vYs8HuganeW8ADn+fx kWXg== X-Gm-Message-State: AOAM532oddCbt4anZCj1I+4AflJCZe0yiDKcd86ZBU8zlohhD8g62ffX HlW4bJbWOCukmOceV3/eyWZgI/kK1W7uvQ== X-Google-Smtp-Source: ABdhPJzxtrbtvXbBp87jpJzjdXR38TWqoRSXeyJ8ydBpyheglxV6zjtBW9ZjUtLiDEmMbidOzIHTAA== X-Received: by 2002:a17:906:4993:: with SMTP id p19mr17269494eju.277.1600117629478; Mon, 14 Sep 2020 14:07:09 -0700 (PDT) Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com. [209.85.208.51]) by smtp.gmail.com with ESMTPSA id l21sm8663683ejg.124.2020.09.14.14.07.09 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Sep 2020 14:07:09 -0700 (PDT) Received: by mail-ed1-f51.google.com with SMTP id g4so1002893edk.0 for ; Mon, 14 Sep 2020 14:07:09 -0700 (PDT) X-Received: by 2002:a2e:91cd:: with SMTP id u13mr5091065ljg.421.1600117171599; Mon, 14 Sep 2020 13:59:31 -0700 (PDT) MIME-Version: 1.0 References: <20200914204209.256266093@linutronix.de> In-Reply-To: <20200914204209.256266093@linutronix.de> From: Linus Torvalds Date: Mon, 14 Sep 2020 13:59:15 -0700 X-Gmail-Original-Message-ID: Message-ID: To: Thomas Gleixner Subject: Re: [Intel-gfx] [patch 00/13] preempt: Make preempt count unconditional 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 , Sebastian Andrzej Siewior , Lai Jiangshan , dri-devel , Ben Segall , Linux-MM , "open list:KERNEL SELFTEST FRAMEWORK" , linux-hexagon@vger.kernel.org, Will Deacon , Ingo Molnar , Anton Ivanov , linux-arch , Brian Cain , Richard Weinberger , Russell King , David Airlie , Ingo Molnar , Geert Uytterhoeven , Mel Gorman , intel-gfx , Matt Turner , Valentin Schneider , linux-xtensa@linux-xtensa.org, Shuah Khan , "Paul E. McKenney" , Jeff Dike , linux-um , Josh Triplett , Steven Rostedt , rcu@vger.kernel.org, linux-m68k , Ivan Kokshaysky , Dietmar Eggemann , Linux ARM , Richard Henderson , Chris Zankel , Max Filippov , LKML , alpha , Mathieu Desnoyers , Andrew Morton , Daniel Bristot de Oliveira 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 14, 2020 at 1:45 PM Thomas Gleixner wrote: > > Recently merged code does: > > gfp = preemptible() ? GFP_KERNEL : GFP_ATOMIC; > > Looks obviously correct, except for the fact that preemptible() is > unconditionally false for CONFIF_PREEMPT_COUNT=n, i.e. all allocations in > that code use GFP_ATOMIC on such kernels. I don't think this is a good reason to entirely get rid of the no-preempt thing. The above is just garbage. It's bogus. You can't do it. Blaming the no-preempt code for this bug is extremely unfair, imho. And the no-preempt code does help make for much better code generation for simple spinlocks. Where is that horribly buggy recent code? It's not in that exact format, certainly, since 'grep' doesn't find it. Linus _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: [patch 00/13] preempt: Make preempt count unconditional Date: Mon, 14 Sep 2020 13:59:15 -0700 Message-ID: References: <20200914204209.256266093@linutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: 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=9Qs78FMzlt+im4GrVUJu3esmNYK1MSMDWWoqgBiwThs=; b=ERO6mM2HDltE439vWz9d9wZL1Z1US74Rep2fFSqw78LuIb7lPia7EGvlr1OC0CVjXq SMHEUg44TyaQk6ZJLSPy2HsSiKOu/iozCQgjKu5X4wpxZiRqxlsnhy+mopIISbxgK1FP TMlpT1uLwxNI5kovsL0EwxutKi15MuXbWCbt0= In-Reply-To: <20200914204209.256266093@linutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Thomas Gleixner Cc: Juri Lelli , Peter Zijlstra , Sebastian Andrzej Siewior , Lai Jiangshan , dri-devel , Ben Segall , Linux-MM , "open list:KERNEL SELFTEST FRAMEWORK" , linux-hexagon@vger.kernel.org, Will Deacon , Ingo Molnar , Anton Ivanov , linux-arch , Brian Cain , Richard Weinberger , Russell King , David Airlie , Ingo Molnar , Geert Uytterhoeven , Mel Gorman , intel-gfx , Matt Turner , Valentin Schneider On Mon, Sep 14, 2020 at 1:45 PM Thomas Gleixner wrote: > > Recently merged code does: > > gfp = preemptible() ? GFP_KERNEL : GFP_ATOMIC; > > Looks obviously correct, except for the fact that preemptible() is > unconditionally false for CONFIF_PREEMPT_COUNT=n, i.e. all allocations in > that code use GFP_ATOMIC on such kernels. I don't think this is a good reason to entirely get rid of the no-preempt thing. The above is just garbage. It's bogus. You can't do it. Blaming the no-preempt code for this bug is extremely unfair, imho. And the no-preempt code does help make for much better code generation for simple spinlocks. Where is that horribly buggy recent code? It's not in that exact format, certainly, since 'grep' doesn't find it. Linus