Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1083775lqt; Tue, 19 Mar 2024 12:06:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU7fLPNJcH0MIrKam3pei+qW0CX0EGrBaEw2hhfvQZz0NkEOU+mbh7ADMr54GvZrXK2/tpN2S7DPTVyNfMr7nHwtCo2X9qtwFPzf97iDg== X-Google-Smtp-Source: AGHT+IFyEk9AqkM8ZMLFP0HLOSGeA1J85KS+pGCZvGjtm4ffH68BZIWFXjeEdmymCJ3s7IsvuSEK X-Received: by 2002:ac8:5e0e:0:b0:430:aebb:4611 with SMTP id h14-20020ac85e0e000000b00430aebb4611mr3040468qtx.15.1710875202366; Tue, 19 Mar 2024 12:06:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710875202; cv=pass; d=google.com; s=arc-20160816; b=FW9FPXEjPS97BUiVnMvOxV0xbycBX5oBjJ5/pJx6FqoRYDyWweCWzKYwV3ftTLP4RH 6cX68uppiyf7Jrcpg8u90ZjW/9+bRIzR30oTa+p8GZyJcInnUnNI0cAlOFeiEsOc3h2C CNWRCGDLakHCX3OdbfhaCpjCuEqoyQQeD+sRzEPivhvq6GIZeUb+RaYECx1QvgWfsBjA Gd1jB9dhGksqF/ssxQ7WKuMOlcUspQ3L5BC4Ux8HTAOzXVU2AbXe5CsCKhksRx/OsB6p IS8inv82mkWhR2ceHbIahm+2SLhaI7Y5eKRPkAV9ONRdmwnFeaBHuSboDE+piDYdtcJO xq6Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=308AIC0mKgKOiFvltlBe5QH+mWjYoXhfz7TbckUNBXs=; fh=IycyatD8G++MwFoNnfqq+wyLymd0ARFN7hI7l/Byq9w=; b=U32zqpxOE+1flXZBquWMr7SSpj9mpiwG1sziUCqkhsmEH0NHaVYhuJ5+ECnPCoLvMU JSKK8+oCSS0FdyqxS6B/R5ycC8bWcJZsHCpA+BdKr2omXCcqqBXDwYP/1VVQNDEiEyeQ juXXvKb0fIP4tJZSWK2tgVwrZwHTecJYzOs10MwYttW36mqoZePaUGKOZXLcl2Ku5xkR zHphWF0rrdRbwhOJBR6W/LTX7yUuSgruKi7m9se37k0roqq//9jbzaoGzJPS9wtNByKE o/35u6DEsdXuj2jsDE2U1AZ9H4uG8Q5ddIIo/eOC2rb8IiovP2+IGvrbYUl7mLHv9cbH PJ0w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=n9sQEweH; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-107758-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107758-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c21-20020ac87d95000000b00430ea26ea2esi1671320qtd.592.2024.03.19.12.06.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 12:06:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-107758-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=n9sQEweH; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-107758-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107758-linux.lists.archive=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 0A3A91C22D07 for ; Tue, 19 Mar 2024 16:01:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5AA657FBB7; Tue, 19 Mar 2024 16:01:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="n9sQEweH" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 08F0765BAA for ; Tue, 19 Mar 2024 16:01:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710864090; cv=none; b=N5APyIAS1mCHZKDKA/NA4ZT82Jh7Pw8oiBQhYFViG3WcDjPApo9gxvEDfWQv/OWeAxP7f2bbvA5LgnZmOlq5UsN/ernYIWtlegCkVLC7sMlffUKJMY1J3dd0GqfY2WbmdPqVhQVC+ffKKA+9ZF3C8VHqaEMP4sUNg1nIK90tews= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710864090; c=relaxed/simple; bh=EJNNgx8uoxlcenj0kJ6LOq9STgZE7L/wlKEhoCh8VXU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DfKJuxuhZsD2y4mR3Mo1FZ9HKYO7Tnn5RlVreRSbOIvCDi2nPHoV5fq5JuMqN9L/h1eqvdTBwc8np5DhMCPDSgWxXUHeTpS3ziUyuJ5SLe+TGUkakJROswwxA+HXgiIHeK7XgOvdP4y7J1ZKK+aVitrmpVDqDtvQxrvHvh9YuwM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=n9sQEweH; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=308AIC0mKgKOiFvltlBe5QH+mWjYoXhfz7TbckUNBXs=; b=n9sQEweH79RVcYq6RuXmpk8whB tl+mVIbNHr458LsfgJxEPHqudBd6nNoh0juqADM9zMVmsUNYCbMYPnbQs0dQwDzXOgzUzmKdlCx2q IdLpH4Q3WD7ND4T6zti2Z4qa9cEWIpIi60zKs8JTtr4kkmMZjLU5MQlTZ9uyKS8fFKcsPdSY4hU3Y SyOa2L2VMsQS05fWA9RGVZPuirvpiUIAEvGbhgGvH3UdrTgfaUrtMFfETm/ZrzUrvkXNNRuU+DcwV 8l3j5t3/sI6me2mxECUBO+VbzvuwXxqsdDfu1zzRfDbzI0nruWXjim6EWhD+J+wRYGplrKFLMy1kQ njOSo0Bg==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rmbu2-00000002GUm-2rIJ; Tue, 19 Mar 2024 16:01:26 +0000 Date: Tue, 19 Mar 2024 16:01:26 +0000 From: Matthew Wilcox To: Sebastian Andrzej Siewior Cc: linux-kernel@vger.kernel.org, Boqun Feng , Ingo Molnar , Peter Zijlstra , Thomas Gleixner , Waiman Long , Will Deacon , Clark Williams Subject: Re: [PATCH] Locking: Let PREEMPT_RT compile again with new rwsem asserts. Message-ID: References: <20240319070550.ws_uO21-@linutronix.de> <20240319141506.DUd9NKl4@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240319141506.DUd9NKl4@linutronix.de> On Tue, Mar 19, 2024 at 03:15:06PM +0100, Sebastian Andrzej Siewior wrote: > On 2024-03-19 13:38:06 [+0000], Matthew Wilcox wrote: > > On Tue, Mar 19, 2024 at 08:05:50AM +0100, Sebastian Andrzej Siewior wrote: > > > -static inline void rwsem_assert_held_write_nolockdep(const struct rw_semaphore *sem) > > > +static __always_inline bool rwsem_held_write(const struct rw_semaphore *sem) > > > > The locking maintainers were very clear that this predicate Should Not > > Exist. It encourages people to write bad code. Assertions only! > > What do you refer to? The inline vs __always_inline or > rwsem_held_write() should not exists and it should invoke directly > rw_base_is_write_locked()? I see Waiman already gave you the substantial answer ... but why did you change inline to __always_inline?