Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1281857lqm; Thu, 2 May 2024 09:57:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVi9ygr/RKkxMdm9aBaHViIDmL0l3y91QEPv5JG9FmKDpSH7BSNJbmaVAddd+wI0jZf+RdD2sBUwBRUYFCvL/cQiY5F3D10LQ1tExEdXw== X-Google-Smtp-Source: AGHT+IEMIfgcWgwh5tn/CFQuUfDzxPylz8Z+J7iGf0qFz/TsRzjcZzid57axduRAOZPnpTM1fzTx X-Received: by 2002:a05:6a20:3cac:b0:1af:386f:a921 with SMTP id b44-20020a056a203cac00b001af386fa921mr452438pzj.16.1714669034568; Thu, 02 May 2024 09:57:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714669034; cv=pass; d=google.com; s=arc-20160816; b=g8Cnbvhdub3MD6zakYSfuLzBQQmp45DkFOKDlrT1XrLB2L4pKdZJrvMiqQikeJiDIc QK4W6THEsMEvTd1ldm5HZUquJuwafhT98aoo1XeIYguK/nTyVK5zqsXfNg+fv4b6M4Mm FFTmmmP8mt8gQlO8sUGTU6Frzm6fZ9kpQB83y1jo89dyrbz2CD32F8euBqHlggGgt3mP kBEXqjC+gGI2quYVLSm72CIBt5PtOMrDF5Be1uFR27IQ5/pWxfjbYx1PsSVG41Ipriv2 GMyOsuvEtcUYOYyiIYTv3JCeIIRzziAaWJ6x8RR7PWrG3/fUBLoisZFPeA59DDobMktD T7vQ== 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:feedback-id:dkim-signature; bh=2e05O22ZC/rIe8aqzeD563ZAugqnhUbzGJboIi69AQw=; fh=gu9+DGd/TyOjXs8EJRfb0vQ1q4mlMYquNiGtwEq1Y4I=; b=RhhhJOS7d4fMAtn7R4oGdI8uskVkENgEFWyAgXPQx5AiPzop7lA/ufWjTyqJxonLem x3WtFK5tHhqfUQJNtSvKCvpGCtXohAMmevjTTv72bnqZAuZmcjZ+OjcwbN59oR1BxSxH kc068vCXjtW9AIwag4oQ3ttfkkdP6uwsvyDgCTF9m8AJrsCl/7fMECvA6IeOdUWzFF0E VDHX5/sh63WBh7ne6V5WlYqe1yLTpP6K9x/gmqq2YswgrCAfG6LuaUACj10UIiPF4AqH IxVEIwGLZOIQW+Wo+L4AeNr10gyILQ+/rhOTcB5y069Frg7nfUz5EdgAaSB3IofwkASK vYag==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=T64ldZ+R; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-166738-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166738-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id h127-20020a636c85000000b00608f6e3dee7si1290143pgc.848.2024.05.02.09.57.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 09:57:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166738-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=T64ldZ+R; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-166738-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166738-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id B12D9B21E31 for ; Thu, 2 May 2024 16:37:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 23EC515E7EA; Thu, 2 May 2024 16:37:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="T64ldZ+R" Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1065155350 for ; Thu, 2 May 2024 16:37:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714667872; cv=none; b=I5sDc15Yh+Kip8RX1V7i8m7Xsx4paKsRp4qPC3+srkyI8F7tWWqdrD4dczcPFYPX6qkbTU5HLOOY8j4WQOP/X502yEpui9CEIJtAZNS05ZSOZ1fV22XRbXZgQ4Gst/qXk5bxa86POj5yTssYznkwbZ9naD70mVdTPG+6R7f/RGs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714667872; c=relaxed/simple; bh=Aw2TZpFf5p2Lk0E/0yZahQlvESUj4IsJOQc9aJKNHXQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lr5Ea6EOBSgBCSqaui1mqDs0Tw1HSkncta+51FBkJS1hX4WBY2yHOMDZ0Eavh8ZeBAJg2GEdTGts/YG1OELjlEzyAjufL+I6UD81QgqrVD4FXfrZZjgbvcTOL/vhABRGXIq2RXqiorhIHwStVM1hpiC80PxAkaXZMl0+NA2JDxU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=T64ldZ+R; arc=none smtp.client-ip=209.85.160.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qt1-f178.google.com with SMTP id d75a77b69052e-43ca8e1f990so10774581cf.0 for ; Thu, 02 May 2024 09:37:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714667870; x=1715272670; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:from:to:cc:subject:date :message-id:reply-to; bh=2e05O22ZC/rIe8aqzeD563ZAugqnhUbzGJboIi69AQw=; b=T64ldZ+RQ5KqO0UvOloMfqw+rNHWIbIxfbJTbKz604mGWolyrXvO8cG4MPyWq7YYfE I73B9wEXLBkDLG5VYqRP0lcx43fprj60kJ94li9AVBh0NR+6C9dMod5uOoxvUi8ZFhfk vphH1YLotXrRM90Kxrj8OUpKIvXsWEsHR27f4HCT4AJDPTS1v29tCToJbfoCnt9GHclm D3bkqCK1C827iURjTXtxCURbKWkMx58neHg3NtEy2qcJQu1S93v9KLPkuvrvk13Yjytu 2Jlzk/rz4847tCiUAsj+Dr9zsHjzWIkZwpLJC9UUEjdeKenJNjlyVizT9u0nr3Ki38L5 xxQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714667870; x=1715272670; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2e05O22ZC/rIe8aqzeD563ZAugqnhUbzGJboIi69AQw=; b=TffaOxKmAnM4o8Ihs0e2KZCeQFJpyy7AFk9Cu8aoRUWi09OaOBoqnakGUWikNxTiiC g3m1Q2EspDLqLN97Ktt/KCwkdIemhYGQwlp+Y6DFeG5fgrNHWredkPq5zQCV5kuIMDRs o/kyjCpZSycUfrGjdZ61Hhx29/8J5nUlxf3yZx/H7grf6AU8rqnle+UHx0qDwdbOHY0R DVwDEiAJWKK0reY1iSc55ktMRRZmNIrNJiHAIF19PaurS1+cwK1a0azhnP34Pqlhj26j 8SQ1d6J64ARgdVCXqBIarEovMXRonWq6XT5/bRvhI5J0pqnAvJXtOxTSnuY4gU4S6k56 0Alg== X-Forwarded-Encrypted: i=1; AJvYcCU68aguryA6lLc3MR39kxlzRA5BGQdn33WxY+22AGiDzJyxudtkQgo90/NlybvcQ7+T/32UGXBFh9eIQTeIpbHE8YgmHU+82jzk4fjc X-Gm-Message-State: AOJu0YzyUp4+11SwTcsexMoP4dXB2Yah6IoLZArxW7UVKVtRyaU1z1BO 4Nb56XNxNoa3VWNrMA5sHvd6VAsV//KBTfvionK2HnvWVd2PLiZG X-Received: by 2002:ac8:5f09:0:b0:43a:b8e2:5870 with SMTP id x9-20020ac85f09000000b0043ab8e25870mr539823qta.3.1714667869820; Thu, 02 May 2024 09:37:49 -0700 (PDT) Received: from fauth1-smtp.messagingengine.com (fauth1-smtp.messagingengine.com. [103.168.172.200]) by smtp.gmail.com with ESMTPSA id f8-20020ac840c8000000b00434c31fa60csm605386qtm.92.2024.05.02.09.37.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 09:37:49 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfauth.nyi.internal (Postfix) with ESMTP id 8C8141200069; Thu, 2 May 2024 12:37:48 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 02 May 2024 12:37:48 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvddukedguddtgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeeuohhq uhhnucfhvghnghcuoegsohhquhhnrdhfvghnghesghhmrghilhdrtghomheqnecuggftrf grthhtvghrnhephedugfduffffteeutddvheeuveelvdfhleelieevtdeguefhgeeuveei udffiedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epsghoqhhunhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqieelvdeghedt ieegqddujeejkeehheehvddqsghoqhhunhdrfhgvnhhgpeepghhmrghilhdrtghomhesfh higihmvgdrnhgrmhgv X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 2 May 2024 12:37:47 -0400 (EDT) Date: Thu, 2 May 2024 09:37:17 -0700 From: Boqun Feng To: "Paul E. McKenney" Cc: Linus Torvalds , Marco Elver , Tetsuo Handa , Greg Kroah-Hartman , Dmitry Vyukov , syzbot , linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com, Nathan Chancellor , Arnd Bergmann , Al Viro , Jiri Slaby Subject: Re: [PATCH v3] tty: tty_io: remove hung_up_tty_fops Message-ID: References: <892324fc-9b75-4e8a-b3b6-cf3c5b4c3506@paulmck-laptop> <1c886023-ae61-46ba-bb3c-b460c30de937@paulmck-laptop> 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: On Wed, May 01, 2024 at 03:32:34PM -0700, Paul E. McKenney wrote: > On Wed, May 01, 2024 at 02:49:17PM -0700, Paul E. McKenney wrote: > > On Wed, May 01, 2024 at 02:20:35PM -0700, Linus Torvalds wrote: > > > On Wed, 1 May 2024 at 14:06, Linus Torvalds > > > wrote: > > [ . . . ] > > > > I'd love to see an extension where "const volatile" basically means > > > exactly that: the volatile tells the compiler that it can't > > > rematerialize by doing the load multiple times, but the "const" would > > > say that if the compiler sees two or more accesses, it can still CSE > > > them. > > Except that "const volatile" already means "you cannot write to it, > and reads will not be fused". :-/ > > > No promises, other than that if we don't ask, they won't say "yes". > > > > Let me see what can be done. > > >From a semantics viewpoint __atomic_load_n(&x, __ATOMIC_RELAXED) would > work for loading from x. The compilers that I tried currently do not > fuse loads, but they are allowed to do so. > Yeah, I wonder the same, from what I read, "const volatile" seems to be just a (non-volatile) relaxed atomic load. Regards, Boqun > Or is there something I am missing that would make this not work? > Aside from compilers not yet optimizing this case. > > Thanx, Paul