From patchwork Mon Nov 19 18:55:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Waiman Long X-Patchwork-Id: 10689327 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C6DDA5A4 for ; Mon, 19 Nov 2018 18:57:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9FD82A46C for ; Mon, 19 Nov 2018 18:57:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ADF872A479; Mon, 19 Nov 2018 18:57:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5612B2A46C for ; Mon, 19 Nov 2018 18:57:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E2E0C6B1BF3; Mon, 19 Nov 2018 13:57:43 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id DB4B36B1BF4; Mon, 19 Nov 2018 13:57:43 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BBB186B1BF5; Mon, 19 Nov 2018 13:57:43 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by kanga.kvack.org (Postfix) with ESMTP id 955936B1BF3 for ; Mon, 19 Nov 2018 13:57:43 -0500 (EST) Received: by mail-qk1-f199.google.com with SMTP id c7so70780625qkg.16 for ; Mon, 19 Nov 2018 10:57:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=/AXVtKcmys+lbDgtDQa281BoRXMYSCg3AAu21s16z2c=; b=XpjiH0P3zJvH/3ffGu3jPYiRMVPM8kfTcAZ52+W/NksK1jTnmdKASZb0lm8D4Q5oIk TRA4SKPeh/RnNMyEx6V1P/wt6fPUaMib3dOrqOpRfOY2WZff8bJ+x+n1j+Hm65oylRRk Quiz2N1ZgYOJnmRrUuW/xxquFsz+nyk9J/y+vrrJZGJvcFhjbgR3jpNuEMgwRq8MSdod KXsTZJCRn8uBUTqTDyQdFi5nK7/6o4/Jya45e+BOOK95u77g8+hDnzVzohOl8W3+Tkz3 0qijdGlw34WkJsGW9BEt2vpMHS/B724x4jqaz78awTMvkzBBVcSvuNmS6IPBd13AblK7 67aQ== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of longman@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=longman@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Gm-Message-State: AGRZ1gIqjbV0BhPtQ1PcKRD0iOADjnFLneGC3nDLb/hpz+eaAXy64ocL y/DjXDO98t1JJWy+FPQlV+PeY4qFhwAOmBATLinRILWp0J2GEc2x/6T7o7IJ4J+FAbEB98sKPmP lGELXCHmLDVQaHvG2lbsxclz7btlH2NN7gWEZlmFG4woAYHEwghYxaX+2fVsZ1jg5+A== X-Received: by 2002:a0c:b02c:: with SMTP id k41mr21359657qvc.154.1542653863398; Mon, 19 Nov 2018 10:57:43 -0800 (PST) X-Google-Smtp-Source: AJdET5eZ63u239J+ufcEOpawG9DPssygGn5gyYDN96kDntD9jjY2oalcLBcHhUQBO9TqqTAVNn98 X-Received: by 2002:a0c:b02c:: with SMTP id k41mr21359635qvc.154.1542653862923; Mon, 19 Nov 2018 10:57:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542653862; cv=none; d=google.com; s=arc-20160816; b=SmaZn9EMcqO22rD5YyQ6KZACn2bmKBsnN1wzbfdnrI34wWoEm9feRZPNzd/bl3vYa+ MIBT8JkYo6LgoplZqWQo7sou/And918XUqr8Jx0Rcdn+fwtT2L99BLLXZkFeElTI+wfa wNubTwlJ/GAq5tjJNVyt1hF2iCGI28K9ig9aA4+YwwL/WWfl4Nse2YzKqSyjCIf1TG0l f2xZpzJ8JWboI4C1WU9eeOKLTJbD1ZInj6fhAka/zUZsOa2idFeyxo0kmHGorNiDpzgA mmvsNvFKHBYawgDg5Jjel7BtCRnWjyWDWBWKzsCxdhpTKY76SS+f+RJuMe4wQWwLckJq YL6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=/AXVtKcmys+lbDgtDQa281BoRXMYSCg3AAu21s16z2c=; b=fck+lYwPskHU/GXj6AtuT+TR9Upa/EYm6M3+6GTZTiJdYfqVUeS73Jn3+Jz86CHM9Z 2QKG+hEflpylGJvoDrYqWlv4nh/MV268F1sz7hl73mIRu9Fn6a0I7qmMgU/57F9tpX7H 0HE4UG2pyAd3rBuRBGybiWmgqR7t0nk4zPvzNFaBwi4rQAwfSa43jmkI/beyqzs5tcxR hBHyCmbNIsY6LJSK4k+7KS1hO2AXekcAL39g57n9TSjU3iqdtEAUE3tnM0Tjbt3gAt0q WiX2q04klw4mduGHeqUESpqUkD2JCnY0RI4eu7GB30/gIL4ATwWHTJYV3pGo7XwIFnif lt8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of longman@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=longman@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id l49si2793755qvc.80.2018.11.19.10.57.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Nov 2018 10:57:42 -0800 (PST) Received-SPF: pass (google.com: domain of longman@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of longman@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=longman@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E9A188BD20; Mon, 19 Nov 2018 18:57:41 +0000 (UTC) Received: from llong.com (dhcp-17-55.bos.redhat.com [10.18.17.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4992A608E7; Mon, 19 Nov 2018 18:57:40 +0000 (UTC) From: Waiman Long To: Peter Zijlstra , Ingo Molnar , Will Deacon , Thomas Gleixner Cc: linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, linux-mm@kvack.org, iommu@lists.linux-foundation.org, Petr Mladek , Sergey Senozhatsky , Andrey Ryabinin , Tejun Heo , Andrew Morton , Waiman Long Subject: [PATCH v2 13/17] mm/kasan: Make quarantine_lock a terminal lock Date: Mon, 19 Nov 2018 13:55:22 -0500 Message-Id: <1542653726-5655-14-git-send-email-longman@redhat.com> In-Reply-To: <1542653726-5655-1-git-send-email-longman@redhat.com> References: <1542653726-5655-1-git-send-email-longman@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 19 Nov 2018 18:57:42 +0000 (UTC) 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: X-Virus-Scanned: ClamAV using ClamSMTP By making quarantine_lock a terminal spinlock, it reduces the lockdep overhead when this lock is being used. Signed-off-by: Waiman Long --- mm/kasan/quarantine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/kasan/quarantine.c b/mm/kasan/quarantine.c index b209dba..c9d36ab 100644 --- a/mm/kasan/quarantine.c +++ b/mm/kasan/quarantine.c @@ -103,7 +103,7 @@ static void qlist_move_all(struct qlist_head *from, struct qlist_head *to) static int quarantine_tail; /* Total size of all objects in global_quarantine across all batches. */ static unsigned long quarantine_size; -static DEFINE_RAW_SPINLOCK(quarantine_lock); +static DEFINE_RAW_TERMINAL_SPINLOCK(quarantine_lock); DEFINE_STATIC_SRCU(remove_cache_srcu); /* Maximum size of the global queue. */