Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1484543ybi; Sat, 8 Jun 2019 10:45:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxjprMiypaBU6nBtte+1F513gCsUBw04RLe7xVx25GRM4Y+wZBOyIaYlBGGtjFFcMlQshJe X-Received: by 2002:aa7:825a:: with SMTP id e26mr66424173pfn.255.1560015915344; Sat, 08 Jun 2019 10:45:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560015915; cv=none; d=google.com; s=arc-20160816; b=WKmdqOjKtvPUwjnWnSrcWyLAlEg+Yb4RS73NrNPreGxzTKg5tu2DrpeYT8CtHtdFKq uMNSyoOkJn020hSlyXRsJ4pyZk7SnzNlDa0h/Kq6OjHREivnSnFskRNZa5ywZCzZpfZM zuEEohSw/VcVazvdQnXRCCbwCCuGKIs5iWSPRO6SeNvsyl1JW+0UydfJPc4E1m7vLnQd +gJdnlJw5dFAqEbis6ELYPWGDgSG8TWq2pRu1OaApfhKt/ByH/Ia+L8/OYlWBMJuFLyu szsbpZTSyw9AjcLseUAFHEOVUakVhxFbWXOiKqWotfaBIDHmvg+cHWT8OSZLvfdQpCOu ypQw== 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 :in-reply-to:references:mime-version:dkim-signature; bh=I4wuZBASsrfrcVNwlwV9UqOEN6oWZwE6ONOc/qGw3VI=; b=llqLExuDFrt+fOhnWlc2wrVndd4qRQ0P6UvRd03lVhmNmvceDM6M2z+OgPVyuIDFI7 nEXdlZ3HxVT9xuSBHyG8Vr6jXyDzr+doG0rlOpb+eUp3gfrPqHNNirGnKNMmLqpc0PTa wE3OU6fdWZPbQP/GnLjrpufmthdzrcovx5MqZloOy/B+Jw7MUVq7bKTK1qEouWcAInw7 koSYyQTx0TjilT2xkRSs/2ZLa5L+VVwRPrHpYmPwCfSGbOVgPh5uzTvupkr8PEngtUyu VuLQZK/il5IVi3Djbldif13WVei5qlN4HP9DGXRGC/YS2+efXGlN/7a0wQuY8qfnN9lV iTFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Uu1B6CJ0; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q10si5085880pli.403.2019.06.08.10.44.45; Sat, 08 Jun 2019 10:45:15 -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=@linux-foundation.org header.s=google header.b=Uu1B6CJ0; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727301AbfFHRnC (ORCPT + 99 others); Sat, 8 Jun 2019 13:43:02 -0400 Received: from mail-lf1-f51.google.com ([209.85.167.51]:37093 "EHLO mail-lf1-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727202AbfFHRnC (ORCPT ); Sat, 8 Jun 2019 13:43:02 -0400 Received: by mail-lf1-f51.google.com with SMTP id m15so3903937lfh.4 for ; Sat, 08 Jun 2019 10:43:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=I4wuZBASsrfrcVNwlwV9UqOEN6oWZwE6ONOc/qGw3VI=; b=Uu1B6CJ0y6i8Y4/pgQnaoS95gdTJiRuJ++PTvjfS1VHjeY7KoMbrI03rgRi88d8bO9 gy6t9EHCiUmVjonW+cF34EBKqdCBxo0aHHhXx3ME8R4QFi0/niyGdSTdm1gMEAHSJKuE l0ftlnvh3k0TseM0yzFVUQwYJmRTVuUAqpwgk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=I4wuZBASsrfrcVNwlwV9UqOEN6oWZwE6ONOc/qGw3VI=; b=nuRJxQBHr1GhwVGhI1s/VUqQ6VSaHlIUWhlhWyEU6ibcrVRj8ePIQJz68iDkZANQKz S2lfhvvjuDJ/r6K07a0jpNhtjDy6MqTmfWwr5NSEEvW5+KE0yX/JdNpD47CWCySUXLTb hUbQ/BPBiTn/LdxWu15fJh2VKfsvnYqtTbhdZBe/bSe9jXdphYcSwfTzNkgVg5wB0g0j F2kSbonfZ7re7QYyo6uqiDBMEl9tv/BpqvjPuy12xOcHWfiRBJLmnVVRds8pdUKQyU0j XVg6RHqTY3RqE3l/fbkjMD0vtnnoCtRB95JAOm5thK57uy2BO7tZPvzKyDZYcaQH5q3R D1Qg== X-Gm-Message-State: APjAAAXH0lXnuoLUbpCQPG3plGNoEHYEEzpDzc3WR1zvUrc14EGTOZ4a hlHTu1YihbBTdO4EmnfRL5zlOGh4XRw= X-Received: by 2002:a05:6512:64:: with SMTP id i4mr7072052lfo.32.1560015780008; Sat, 08 Jun 2019 10:43:00 -0700 (PDT) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com. [209.85.167.54]) by smtp.gmail.com with ESMTPSA id 2sm49827lju.52.2019.06.08.10.42.58 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Sat, 08 Jun 2019 10:42:58 -0700 (PDT) Received: by mail-lf1-f54.google.com with SMTP id z15so1208122lfh.13 for ; Sat, 08 Jun 2019 10:42:58 -0700 (PDT) X-Received: by 2002:ac2:59c9:: with SMTP id x9mr29635980lfn.52.1560015777829; Sat, 08 Jun 2019 10:42:57 -0700 (PDT) MIME-Version: 1.0 References: <20190603200301.GM28207@linux.ibm.com> <20190607140949.tzwyprrhmqdx33iu@gondor.apana.org.au> <20190608152707.GF28207@linux.ibm.com> In-Reply-To: <20190608152707.GF28207@linux.ibm.com> From: Linus Torvalds Date: Sat, 8 Jun 2019 10:42:41 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: inet: frags: Turn fqdir->dead into an int for old Alphas To: "Paul E. McKenney" Cc: Eric Dumazet , Herbert Xu , Alan Stern , Boqun Feng , Frederic Weisbecker , Fengguang Wu , LKP , LKML , Netdev , "David S. Miller" , Andrea Parri , Luc Maranget , Jade Alglave 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 Sat, Jun 8, 2019 at 8:32 AM Paul E. McKenney wrote: > > On Fri, Jun 07, 2019 at 09:19:42AM -0700, Linus Torvalds wrote: > > > > - bitfields obviously do need locks. 'char' does not. > > > > If there's somebody who really notices the alpha issue in PRACTICE, we > > can then bother to fix it. But there is approximately one user, and > > it's not a heavy-duty one. > > C11 and later compilers are supposed to use read-modify-write atomic > operations in this sort of situation anyway because they are not supposed > to introduce data races. I don't think that's possible on any common architecture. The bitfields themselves will need locking, to serialize writes of different fields against each other. There are no atomic rmw sequences that have reasonable performance for the bitfield updates themselves. The fields *around* the bitfields had better be safe, but that's something we already depend on, and which falls under the heading of "we don't accept garbage compilers". Linus