Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp369251ybi; Fri, 7 Jun 2019 09:21:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqws/h7ElAgtwHn0Wo5uu+x5o1WqTTbjVZ/jhF4hrwOBts7hVOJ9zoXf/ZCDjc4xyJ2lDsl6 X-Received: by 2002:a17:902:9004:: with SMTP id a4mr43530519plp.109.1559924494051; Fri, 07 Jun 2019 09:21:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559924494; cv=none; d=google.com; s=arc-20160816; b=xhl5j8o1JN/C8lGlMM6jCevIaXumIDuRzYAYEwI96ZuVlp/jsU3+QuYOlsIeBLuz0p w12EfnPPkzwGu5jsq8efRyXHdhn2+x2DsU4hiFq4TfS+TzYhPmYdqZQ1ebGJAtdfXMzg CfEuwk1RIUIRaDtR1bZqTh9u18ChkNLlYP+9s7G2LHPJ4INC5Gm9W0AzOtGFKgro0lKg V/sDuZVN9+TOp47L/7/lamy2NBV4GRVMT5zZRlcGDPJRtRS4/Q9FRZySE+J++mMCInA6 sJ/xsHXtWHxnM9qBR0pvB7JYqvguzoXHRsKB7z1ziFc6dQanZfhwmqzi8o0lc2C6DFuE pSwg== 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=Sah1sze9qZQXC9dhxye7WQeDvgCv5Q6wpPURRp8bWQs=; b=fu7/v/20Ac3BIBEfxz7Igso3iF2u8X6NZJLr/9Y+YAP+s2IG2b1yKrbTJditnWrw0D soR8deCd54ZMPTeJUNIN2Kb/vWJd+pGxRQ1b3CHM5H6zI0Z/1hyj9n1APQMkeo2RklVy Qcwei5aNkABgbDlOiuK/xkfeiukK3y+jBV2pBs3B8lVVUATrA54LkbJYV0LQteOSJrlQ PFEIuTwZo3EI6IynyzWFgja0nCwyfdZOXvqVupmpZqFCCly0eKNkiqGXs5Oym/JY5vyJ 5Yc950BublvT6ZeKnXajOTf0R3g6UmyUkhb2VH7GfEybiUjem3XgA+Eh+sNu8tMKZlLn wXmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="GZp/BOH8"; 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 o32si2384723pld.115.2019.06.07.09.21.17; Fri, 07 Jun 2019 09:21:34 -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="GZp/BOH8"; 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 S1729969AbfFGQUD (ORCPT + 99 others); Fri, 7 Jun 2019 12:20:03 -0400 Received: from mail-lj1-f173.google.com ([209.85.208.173]:47013 "EHLO mail-lj1-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729127AbfFGQUD (ORCPT ); Fri, 7 Jun 2019 12:20:03 -0400 Received: by mail-lj1-f173.google.com with SMTP id m15so2227850ljg.13 for ; Fri, 07 Jun 2019 09:20: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=Sah1sze9qZQXC9dhxye7WQeDvgCv5Q6wpPURRp8bWQs=; b=GZp/BOH8X5Pg721SyiLtnieCJ/ZD2Ktw+FSJGwq590YKHcmVc4mKv9e4VgZjoepG+N L9grIrK4IatsF2cxfARKtaaDuUoOOYkIk1HZzSNsBgIVd6L0FrIRl1HF5p2lKnJv9IyM mXYfqUagFtpgySX1R/W0DkVdRgXr8y5qemuHA= 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=Sah1sze9qZQXC9dhxye7WQeDvgCv5Q6wpPURRp8bWQs=; b=f/88a2EA4QBeQOmqXUv1SQijkGQzsKM7VDn02vFfJLKORgZdzOuz7tE69AEFtzmpyP JFxkdX1mTha4gDpGABAbciqkKhVt2BB1jGRvyGJA7SfPuq5VBnuzzbkAZEPAQQ5+7biZ biveTYxFEqp3s7OPP/93rUJNx3TmZFjYx6LlCNnpgdNU4lCgdWC0lpuTZRyIebZMgeu6 nfaU+kyXL4kyfOOHm4L3jU5V1NdWaCDb9DOfSJ41qE+Kh3qfGXXjrIX0kdkeZdmsQQRm tRf13ebOJZ8X/qUfsSuQjpOhgVX6hv7VuEH8tHZ19fu5fV6WcmHKaoVezne/EMWrwkiv 4kqg== X-Gm-Message-State: APjAAAUIo9SkONQHq2mwqfOy3cJF4MsPp7jGj5leK5GpH5v7ouaDMHds xywzaC1Y6MDvWJxWevnCl07O0p0OEvw= X-Received: by 2002:a2e:9c03:: with SMTP id s3mr13147824lji.209.1559924399645; Fri, 07 Jun 2019 09:19:59 -0700 (PDT) Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com. [209.85.167.45]) by smtp.gmail.com with ESMTPSA id q1sm477157lfc.79.2019.06.07.09.19.58 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Fri, 07 Jun 2019 09:19:58 -0700 (PDT) Received: by mail-lf1-f45.google.com with SMTP id y198so2079692lfa.1 for ; Fri, 07 Jun 2019 09:19:58 -0700 (PDT) X-Received: by 2002:a19:521a:: with SMTP id m26mr2437446lfb.134.1559924398137; Fri, 07 Jun 2019 09:19:58 -0700 (PDT) MIME-Version: 1.0 References: <20190603200301.GM28207@linux.ibm.com> <20190607140949.tzwyprrhmqdx33iu@gondor.apana.org.au> In-Reply-To: From: Linus Torvalds Date: Fri, 7 Jun 2019 09:19:42 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: inet: frags: Turn fqdir->dead into an int for old Alphas To: Eric Dumazet Cc: Herbert Xu , Alan Stern , "Paul E. McKenney" , 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 Fri, Jun 7, 2019 at 8:26 AM Eric Dumazet wrote: > > There is common knowledge among us programmers that bit fields > (or bool) sharing a common 'word' need to be protected > with a common lock. > > Converting all bit fields to plain int/long would be quite a waste of memory. Yeah, and we really don't care about alpha. So 'char' should be safe. No compiler actually turns a 'bool' in a struct into a bitfield, afaik, because you're still supposed to be able to take the address of a boolean. But on the whole, I do not believe that we should ever use 'bool' in structures anyway, because it's such a badly defined type. I think it's 'char' in practice on just about all architectures, but there really were traditional use cases where 'bool' was int. But: - we shouldn't turn them into 'int' anyway - alpha is dead, and no sane architecture will make the same mistake anyway. People learnt. - we might want to make sure 'bool' really is 'char' in practice, to double-check that fthe compiler doesn't do anything stupid. - 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. Linus