Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1351136imm; Fri, 12 Oct 2018 16:57:56 -0700 (PDT) X-Google-Smtp-Source: ACcGV60M235FW3koUGPXnWTCSJkmCcqCfcojnPCj01ASS4tDsy5JKtlkkCSsQwlXhIXwbPHT6pKk X-Received: by 2002:a62:5c03:: with SMTP id q3-v6mr8261980pfb.182.1539388676151; Fri, 12 Oct 2018 16:57:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539388676; cv=none; d=google.com; s=arc-20160816; b=GYl3f0vYHZuNY6hqBrQKOOtj2nyDxp+g94py5chFXi1uAFGnyfzvXTt1Q3gXNkflcp 1eJc/qpMEv+4NZDeMpUoZr+uQbeKDE/UqZEa1dDf54f+DkP+vBugTZyO01Ovm3Hf3egB H15p9PNyjbIu/OcmjIwaT+55yKMQNXhc+GDI5OxYoRCY76gvDUMX8Q+EtsxbrfcJ5wQU e8QX0BzJBkhqi7VNMbqJWFP4mPmJexvsydL3A5ns7GDQWwqtsc/E1uAcHLhUMQe57hA/ LU9U6Z+Noej+ueZLuYu8SOtsVUPfVW6bSm020oVRD3P+EBoIsuGEniZblssq5FAY7QrO sdrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=8+30gH78WadLtqXuwk4i2uJvR2FHc6L7p7tVC0VCwHY=; b=B/lAwHJ2NpYhF+nt57bK0BQdK8Xnk90TGNJrj23L9U92i4K2rovlP7O67Hh3TZj3tu TFBTWMNu5rz6z/PMVf2N9ZBHP10EnpDZxcUlcjIuxo0ziFR4AVd8nQDeaybhTe50hHLn V16yNIOsVGu2wtfSHXuZo8vFsCDGanNfR1SPWLGkoqEDBxZ0PWcyEtS66TNqpcdS04Vx hL2+7dRKZFcRPopJg4TdFPjzlkeAtIUtmZ9q2ibJLAbGgww1qLoElF6JnjtJ62NYIAob 1QOjmqJ4aoGkUMPXu/2q+ay+INz+WPjNALYhcgPUMzYcswAsBd477jCExnvO1JG4XGqf HVqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q85-v6si2772287pfi.183.2018.10.12.16.57.29; Fri, 12 Oct 2018 16:57:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726033AbeJMHbp (ORCPT + 99 others); Sat, 13 Oct 2018 03:31:45 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45630 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725931AbeJMHbp (ORCPT ); Sat, 13 Oct 2018 03:31:45 -0400 Received: from localhost.localdomain (c-24-4-154-175.hsd1.ca.comcast.net [24.4.154.175]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id D7127F7F; Fri, 12 Oct 2018 23:56:56 +0000 (UTC) Date: Fri, 12 Oct 2018 16:56:55 -0700 From: Andrew Morton To: Sebastian Andrzej Siewior Cc: Dmitry Vyukov , Clark Williams , Alexander Potapenko , kasan-dev , Linux-MM , LKML , linux-rt-users@vger.kernel.org, Peter Zijlstra , Thomas Gleixner Subject: Re: [PATCH] mm/kasan: make quarantine_lock a raw_spinlock_t Message-Id: <20181012165655.f067886428a394dc7fbae7af@linux-foundation.org> In-Reply-To: <20181010214945.5owshc3mlrh74z4b@linutronix.de> References: <20180918152931.17322-1-williams@redhat.com> <20181005163018.icbknlzymwjhdehi@linutronix.de> <20181005163320.zkacovxvlih6blpp@linutronix.de> <20181009142742.ikh7xv2dn5skjjbe@linutronix.de> <20181010092929.a5gd3fkkw6swco4c@linutronix.de> <20181010095343.6qxved3owi6yokoa@linutronix.de> <20181010214945.5owshc3mlrh74z4b@linutronix.de> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 10 Oct 2018 23:49:45 +0200 Sebastian Andrzej Siewior wrote: > On 2018-10-10 11:57:41 [+0200], Dmitry Vyukov wrote: > > Yes. Clark's patch looks good to me. Probably would be useful to add a > > comment as to why raw spinlock is used (otherwise somebody may > > refactor it back later). > > If you really insist, I could add something but this didn't happen so > far. git's changelog should provide enough information why to why it was > changed. Requiring code readers to look up changelogs in git is rather user-hostile. There are several reasons for using raw_*, so an explanatory comment at each site is called for. However it would be smarter to stop "using raw_* for several reasons". Instead, create a differently named variant for each such reason. ie, do /* * Nice comment goes here. It explains all the possible reasons why -rt * might use a raw_spin_lock when a spin_lock could otherwise be used. */ #define raw_spin_lock_for_rt raw_spinlock Then use raw_spin_lock_for_rt() at all such sites.