From patchwork Thu Feb 22 15:05:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Waiman Long X-Patchwork-Id: 20800 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2687dyb; Thu, 22 Feb 2024 07:06:40 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUJR9wx3aEP2Vs8WEMUkZShOn1+xTrdfOTSZVW7qhBxggJvsOZL+7WHUI64SehSIRndQUBpuWA/wKbwaw5ZsyIKfmhubg== X-Google-Smtp-Source: AGHT+IFrZFatVf2rVNvd+kTFXJ2BmXS63ySO3dlZJdh+unTGEjLDnEVGJVZSOxlbv18KJZliIe7g X-Received: by 2002:a05:6a20:c6cb:b0:1a0:cf1f:aa91 with SMTP id gw11-20020a056a20c6cb00b001a0cf1faa91mr3878502pzb.25.1708614400269; Thu, 22 Feb 2024 07:06:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708614400; cv=pass; d=google.com; s=arc-20160816; b=sSv4V+G4XiYglmD3jwCg9IC+MQuvxm0fOFalUoYBnWi8V9V4Gn41jidXp0IjDdFNLC OQLKjP2UF07EnhQLGF8sLXmP+p/nab4Me0o54WyD4vw26qxqe+l5H/TBhCWOXxu4nQMG fe5GBWHyU/ngxQuXIEBAbG6LtAPy/45GJbamL4sUItx2IPX9bEqmV/H0nMOcVh6jn0g8 U2qVq1tHwD8Scxrq9zaRke20SaPtAGV27+tWnCsi1DPWynxYlt3j00nZ8CHqnZ6fV9w5 ypMzlSb6m22oy/9ayYVHCUk1Mn+zFD+jZwx3Oo3h6hhWOLhY19FIlr88iWY9fDLXG5d8 2V2g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=K1qX5Dv03TawtMyhU4ox9jjO9nXnBiVGZNH0InUyUNk=; fh=c25v70+ehGE+SiLl84UT2m6flxwHxsFK+3J6BVG3azM=; b=y5OF1Py5izk2LXAgjt1PD7iD2VOJL6HVGia1g8gJfAsqpCLWRX3ZikGYUmet1Stpy/ 5KiFSkdfTgXcs/jf16iQXjRpWLK6RCRR1noSgoLZJtwXD02+SQPk1hAmsFT7iy20VxRQ sFoYWVWgfJ4OqAzitKcJMtpu6WctW2xw+x4hxw/ARp/50m/e+Iq97nv3dT/5ElwUjrK7 /MuThde5k1I1LL8XDLWg8qwamZZLOsv7wlcfKekVAxVifLI51f3BavJKO+U6TYdoXoHX qaO/iaE/UiYqcMoz6EcDgUb18f3yXZvSut+7gcdRznRybgnhkIMS3ki0MkcAGFl7vOBh zPPw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Lm3cwuGb; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-76742-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76742-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id p1-20020a056a000a0100b006e45f715e96si7961925pfh.391.2024.02.22.07.06.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 07:06:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76742-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Lm3cwuGb; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-76742-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76742-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 006C1286D53 for ; Thu, 22 Feb 2024 15:06:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A71DD14D45B; Thu, 22 Feb 2024 15:06:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Lm3cwuGb" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 642CE148FFF for ; Thu, 22 Feb 2024 15:06:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708614362; cv=none; b=BwEqMszhw/bZGbW4H/GwIp3d8L6ULjswpcTFD4vaRN89JxDhYg0Df3yYUMaT3G4BDeQi+OuP5v5KUVQihDjHy3BtZF+3vdlLMn6V6BaiYSP+yl/FtFZScrYBNx3WRXWBzc0+ejESVZ5fnvplrnCHX+IwDOdUcBLIpGs0kejxGJk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708614362; c=relaxed/simple; bh=LrVPZWKPvAwwNnJBB+ZsEXFSkibSCPFppTM1oYFKraw=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Nh6VALXFv5YcJI8wBDmx68It3KvoyAmCE1svUclZ6Fadv9/hXx2xOGd+u2DxHAH0KQMfb1k6fACyuxf1tcfeTcAf8/+xa3Iz73yvQl8PsIBhb0Wrca7+PzeDTSGtwacX8yCI3RKO0sNOVo7aiuu8Ihk44K3QX97+siKoIjuX1Ag= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Lm3cwuGb; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708614359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=K1qX5Dv03TawtMyhU4ox9jjO9nXnBiVGZNH0InUyUNk=; b=Lm3cwuGbg+IwvfG/BI0VqeJ3pmvt93J+iUAjAbMYkKoQzWLPpKHe5RHSCbkRCl9/t8Uhzp cQbPXVV3lkZuRHwyAj5wsKWpj8ivcaoQ9m/LKAtDNoX/G3iTKocUmRPN+wZydIc3AOidhV 58iEhqEHu3s8BUdsycEulLrE1xffNuw= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-544-HNe1d8dePnGUIWX7MVU-cw-1; Thu, 22 Feb 2024 10:05:55 -0500 X-MC-Unique: HNe1d8dePnGUIWX7MVU-cw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0DBDE848530; Thu, 22 Feb 2024 15:05:55 +0000 (UTC) Received: from llong.com (unknown [10.22.33.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id F23D7111D3D9; Thu, 22 Feb 2024 15:05:53 +0000 (UTC) From: Waiman Long To: Peter Zijlstra , Ingo Molnar , Will Deacon , Boqun Feng , Andrew Morton Cc: linux-kernel@vger.kernel.org, George Stark , Waiman Long Subject: [PATCH v2 0/4] locking: Some locking code cleanups Date: Thu, 22 Feb 2024 10:05:36 -0500 Message-Id: <20240222150540.79981-1-longman@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791612053319473630 X-GMAIL-MSGID: 1791612053319473630 v2: - Add Boqun's "Reviewed-by" tags & twist the mutex patch as suggested by him. This series contains a number of cleanup locking patches. Waiman Long (4): locking/qspinlock: Fix 'wait_early' set but not used warning locking/mutex: Clean up mutex.h locking/rwsem: Clarify that RWSEM_READER_OWNED is just a hint locking/rwsem: Make DEBUG_RWSEMS and PREEMPT_RT mutually exclusive include/linux/mutex.h | 8 ++------ kernel/locking/qspinlock_paravirt.h | 2 +- kernel/locking/rwsem.c | 6 +++--- lib/Kconfig.debug | 4 ++-- 4 files changed, 8 insertions(+), 12 deletions(-)