Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp702259imm; Wed, 10 Oct 2018 02:58:48 -0700 (PDT) X-Google-Smtp-Source: ACcGV61J1j+NlahNdtyGIwqQ3prYfDhGbiUkMq30/+nj2S2p+cxlvMgtnbkT/+TpNHFyh/sHscGM X-Received: by 2002:a17:902:b581:: with SMTP id a1-v6mr8545444pls.197.1539165528627; Wed, 10 Oct 2018 02:58:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539165528; cv=none; d=google.com; s=arc-20160816; b=wLefuQpTpoO8NuwqMrj2yBoCYkbDvbHUsbngoi36ZJZyXAsnBlgxw5qm/KxJkiEz8m lMZaqSlvbjWbOMmt/tyg8mWDaKjAH6BENO207G+bIndSEvDc/EplUno8zPROOsViBYVi JGaUENgqKjhSdS2eTH9PjkFSLz7PZrRmm/utHiaPMiAA7W/kuzrmSkMVUniKwrxOQ+Rg vu9IxVXwqFFhfVoP6jZVes694xL6GCHyjfUQc3d69Lh4aVfkcPKjkC3g3Dl2pCtYMGKM 36NNVZaGj7UFK9rozlmM/CiDnTwyEDQfpupOSp279BVNeacejbipm5Flxc4SIA1CqFp0 h82Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=Ek5gZf8SEwoFB6tTmpdxgcujl0KPzmwCj2JurZyr7Qg=; b=cI05V6+x40CbYGG/bOzd9kYVLGsUn1zuUa7OdomBhpD+J+JbnyBSgSNI0ZW4ZrhTVG 8xZCnJZntFhPZ0JvEtIgrt6diZCjxKWeimLGeXgwqWCHPqiYPyqLoiQRv11sicCFJQY/ rXzYcQeBwsz63zPL5UDPWZuiDdv4oirpsDjaID9EmFFDxVVhOkBqSeSChLkoI1E5jWLV v34XgdhYqjEveROFTGpVpABFhj/am9nUbfWnDEMq4RdHSiNoxt/qV+Yz8tbmFVURC1vd +pD4CXC1nCtpeoAIMRCmwQZIyLfg7AMObZl2hBJNKXY0mRflqF4BNRBYZyn4EQ8haQ4J 5mXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=BEm+TsKH; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h18-v6si24517974pgk.351.2018.10.10.02.58.34; Wed, 10 Oct 2018 02:58:48 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=BEm+TsKH; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727168AbeJJRT1 (ORCPT + 99 others); Wed, 10 Oct 2018 13:19:27 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:46441 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726867AbeJJRT1 (ORCPT ); Wed, 10 Oct 2018 13:19:27 -0400 Received: by mail-io1-f68.google.com with SMTP id t7-v6so3398994ioj.13 for ; Wed, 10 Oct 2018 02:58:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Ek5gZf8SEwoFB6tTmpdxgcujl0KPzmwCj2JurZyr7Qg=; b=BEm+TsKHi6EEbm2U2AlyhAAwKeSQZ9q9bqpFc1YN3caQNbNikZfWngg0+K7xLlsbzb YDyhJLn0S8ADDR/3vaHpPlQlLoM3K7rKLaPVvzJJrfzmOopDHRZKTRGaHTjWlSjPWp3Z WElRYHapTHzI+hSL1ejg+uJgH8ppruA4pFNXGtA0iGvk7+X8pmOTnbCAuEmJYv4wqxmn 4V5r+ppUZbe7618lWLqr6d1qRB7EOtVXXsFH62Bo8lwMnWGewXNp8LBJ2ShrCyv0QN4x 4wAhHtmL5jSZULalJ4djmc2gwd2xW3OXtMr9/raE+1rrVrHY/Qx7iHSobF1w+E1FwC3b FDsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Ek5gZf8SEwoFB6tTmpdxgcujl0KPzmwCj2JurZyr7Qg=; b=S77AuY7V+Juk8e6bKaI8cfyzxhL0DrjgN3qKvZ/SiPBY8tmqgRWo2lR3qiioFjEuHX L2apH8lzdrPlbx6nxR+f4T1VkkXGW9L2fOSM7gH92K91YP0Z05q+edgKDM50vNsm0312 D+5EKPB98n2Sn6HtyT4Iz5pd24PVwXL6MaeqxnAOT14F/KhHAB/ENGOI2eTTUNzkjNZ5 0SKq1GtuLcJLKHSBf2oIWA//Z8oy8/00oSP8Ar+7EIyB4icWGE9HAvx4jq35Bf8fyHW0 cr6uUf0kdIUe6RgkNJwekIQkj7VdfbiKVYsQSIcSYPTRd49Hf6VG/0X490+pk0EnU8F3 pTNQ== X-Gm-Message-State: ABuFfoiD/rYkY79D8U1gjvvdtyfsj52E3Ie8iP5qjAbJtva1s4pi9BeV +T80WWz8/mJaM5/7VzCUEEcnbsal6B+5XBucnCfSrQ== X-Received: by 2002:a6b:8b97:: with SMTP id n145-v6mr15831667iod.282.1539165481741; Wed, 10 Oct 2018 02:58:01 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:1003:0:0:0:0:0 with HTTP; Wed, 10 Oct 2018 02:57:41 -0700 (PDT) In-Reply-To: <20181010095343.6qxved3owi6yokoa@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> From: Dmitry Vyukov Date: Wed, 10 Oct 2018 11:57:41 +0200 Message-ID: Subject: Re: [PATCH] kasan: convert kasan/quarantine_lock to raw_spinlock To: Sebastian Andrzej Siewior Cc: Clark Williams , Alexander Potapenko , kasan-dev , Linux-MM , LKML , linux-rt-users@vger.kernel.org, Peter Zijlstra , Thomas Gleixner Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 10, 2018 at 11:53 AM, Sebastian Andrzej Siewior wrote: > On 2018-10-10 11:45:32 [+0200], Dmitry Vyukov wrote: >> > Should I repost Clark's patch? >> >> >> I am much more comfortable with just changing the type of the lock. > > Yes, that is what Clark's patch does. Should I resent it? 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). >> What are the bad implications of using the raw spinlock? Will it help >> to do something along the following lines: >> >> // Because of ... >> #if CONFIG_RT >> #define quarantine_spinlock_t raw_spinlock_t >> #else >> #define quarantine_spinlock_t spinlock_t >> #endif > > no. For !RT spinlock_t and raw_spinlock_t are the same. For RT > spinlock_t does not disable interrupts or preemption while > raw_spinlock_t does. > Therefore holding a raw_spinlock_t might increase your latency. Ack.