Received: by 10.223.185.116 with SMTP id b49csp644517wrg; Fri, 23 Feb 2018 04:39:52 -0800 (PST) X-Google-Smtp-Source: AH8x2243hPD25fIlbhuqumZlaX9G+ULF2QjXumvYL9niLh6Pi975qI7PmeIWSEpfhik1v5AHB4ku X-Received: by 10.101.97.175 with SMTP id i15mr1324136pgv.55.1519389592218; Fri, 23 Feb 2018 04:39:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519389592; cv=none; d=google.com; s=arc-20160816; b=Snk6TDlibvBCJTXSyIF/eTFQzvBLzeUXYCph15WTYJ4by5WUJdEV38Of9+hTiy+QVE jKfVotDGK9p9YuF3s2gaCxNQ0YfaHZ36hTuw9lDW7OOn4jpyhEFIOFoSzxkyyDqN9nI+ r4ADenAFeDvZrZWYuLX174TsBou/5XS7S6TfiQWlSPr0fN38PcYT2Fqe8DWx1fjQSgIb StVj6fH8wtx0fraV+vSHNhYqviS7Nb2fIlDPRxAvYjUTW2CZFcNyW53Xej4WIJ0XkvgO 6hL+4Jw2x3ovsFYiniStjGY8zSGWSDv1bL5mxG8+25Uei1r7ZcWg2GTpsFO92+Z29hsb YXiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=FxtRMKYoL7B94MimEuewnvYZuc3lRE6KZsuuRi8WzmY=; b=TwkNFt08VELBbV6DIkZ7rZ2DDwNSOrGtcXs4DHJodDzW+p1+lvTiLo9JHy9O7YFGTK Q9VTLqI5ODHx0V0wDDz+O1ar9VCo2aTGFCxlJpIZhavW4tp5Hbm8HKSl5ApPI7uXmg/k nqs6QdVLz6rtKcthXvpwCz0P+work3SNX6mGYsmDbkmpalv7SefaRwtaYnsaXOFnEef3 LylgFuZWsEl0n+HJpE690RyYUQx8gGPHadBXSN2FJpXnhsrLlxz0KolKXolDIXsbjjh5 dRu7bWSxEJTLLcAjdiHgeu3IfpZ9gEFE/SArKm0hTi2wrQmlXujc0x7InHXNDk93x7KI 8WGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ptXgIDip; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3-v6si1722146plx.463.2018.02.23.04.39.38; Fri, 23 Feb 2018 04:39:52 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=ptXgIDip; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751628AbeBWMhA (ORCPT + 99 others); Fri, 23 Feb 2018 07:37:00 -0500 Received: from mail-qk0-f196.google.com ([209.85.220.196]:43211 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751378AbeBWMg6 (ORCPT ); Fri, 23 Feb 2018 07:36:58 -0500 Received: by mail-qk0-f196.google.com with SMTP id j4so4724506qke.10 for ; Fri, 23 Feb 2018 04:36:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=FxtRMKYoL7B94MimEuewnvYZuc3lRE6KZsuuRi8WzmY=; b=ptXgIDipaAI7ZuxxWXDaRrYOQciJv3V4LOqOP/5vh6yiN1RKq7iY18nBYVdzI0+vuD 7dIYU0akkOGKnm7AvaUacrrYOznl5lFHj0gRKwFGtLna7QcgqK5obE+y47V+k0gWv8Ry OvRcDOT7Vr8ezWRNa9am2ENPR7NiDR6/Pq1vXv6Q2BNJsCtoht0a/3OjTrwtqphmSk4x VljWoAqUlufb69ArPKA3V5MHJo8giRDX6zFATAu92dtBnG7mgdfDP9p0xuuo3n+WIFNv PrHltbcnw5xZ0TVnyGvfqzKXnob2ZSpO/rokgt0icPQVszxo8WV6uI1H78W9XfKhoxum 0P/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=FxtRMKYoL7B94MimEuewnvYZuc3lRE6KZsuuRi8WzmY=; b=nL0X1NIXgL443uIfE2aF1LpfW4KSwSG1dMmQpBT8Mycnw9hdzG2zcdtBpok8OYC9vL OEhOWZxMKhPGcYfrPSrGp2NUNQlxqNc6LnHvejTTf12Gh8hB5DPJ20yx2Dy1OQ3h1O4i P2iCa64aOCx9oGUkT6aQj/vJXekEiOxgSBz4nd4cMUuQ8/Ytvo1D6LYueTX3NFuiZs8E xvKfqlret91Xv5SlhGaOYMLIRKC9BATrI083XLJ8xuYOc0ajidDyhCNWObsylC1lFdK1 jOY4MYOQz0Q3Z9sFcVC4KWO9ECjrH/3Da44I82OnQ4jrlZZ6St30KbWP1/fgYEHo+dfF TJpg== X-Gm-Message-State: APf1xPDWUS9zQCtMM9PPOTvs5N714m8KHNKnTa8k1h3J6O2tRfrjEe9e 3Knu3maAS0Y9fPpKnNoW2lg= X-Received: by 10.55.217.143 with SMTP id q15mr2319336qkl.38.1519389418223; Fri, 23 Feb 2018 04:36:58 -0800 (PST) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id g64sm1349962qtd.17.2018.02.23.04.36.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Feb 2018 04:36:57 -0800 (PST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id DF2B921DE8; Fri, 23 Feb 2018 07:36:56 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute6.internal (MEProxy); Fri, 23 Feb 2018 07:36:56 -0500 X-ME-Sender: Received: from localhost (unknown [45.32.128.109]) by mail.messagingengine.com (Postfix) with ESMTPA id 4C0D4246A3; Fri, 23 Feb 2018 07:36:56 -0500 (EST) Date: Fri, 23 Feb 2018 20:40:23 +0800 From: Boqun Feng To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Andrea Parri Subject: Re: [RFC tip/locking/lockdep v5 15/17] lockdep: Reduce the size of lock_list Message-ID: <20180223124023.kdl6pkitu2nhgv4z@tardis> References: <20180222070904.548-1-boqun.feng@gmail.com> <20180222070904.548-16-boqun.feng@gmail.com> <20180223113843.GY25201@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="6ux5zkvmskhc7amk" Content-Disposition: inline In-Reply-To: <20180223113843.GY25201@hirez.programming.kicks-ass.net> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --6ux5zkvmskhc7amk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 23, 2018 at 12:38:43PM +0100, Peter Zijlstra wrote: > On Thu, Feb 22, 2018 at 03:09:02PM +0800, Boqun Feng wrote: > > diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h > > index a1f91f8680bd..3fce8dbf5091 100644 > > --- a/include/linux/lockdep.h > > +++ b/include/linux/lockdep.h > > @@ -186,11 +186,11 @@ struct lock_list { > > struct list_head entry; > > struct lock_class *class; > > struct stack_trace trace; > > - int distance; > > + u16 distance; > > /* bitmap of different dependencies from head to this */ > > - u16 dep; > > + u8 dep; > > /* used by BFS to record whether this is picked as a recursive read */ > > - u16 is_rr; > > + bool is_rr; >=20 > Don't use bool, use u8 if you want a single byte. sizeof(_Bool) is part > of the architecture ABI and can be up to 4 bytes (well really anything, > but I've not seen it bigger than 4 bytes for any sane implementation). Got it, thanks! Regards, Boqun --6ux5zkvmskhc7amk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEj5IosQTPz8XU1wRHSXnow7UH+rgFAlqQC7QACgkQSXnow7UH +rhFGwf+Jv+A+TnlEzw1zjBEJM2acomOjUr6R08H+7yF+99YSdLFHuwpos1VgXOo zj9kzDR4+Gx4d+C+CLvN7zaY/XVPzPcTeGFPqTqXbtuJLZ5HkBUrpIXU8zOCW389 c9KIs+F22LWVlvOSQkD0tLUfy8h7TwvLN3YqIRj26d0AW+PZcern+7GmxSgsSZfH P/9w8FGY+CfgyoAWq83bUwmjYBqQL1Fw7A3TXxGNqpbuBvO82ZHcAhP6FZHYt6r+ hCAuDK6LUzix5jyDrMgUf0y2n7Z3ENyKQDiTSuoSXsFEXsIyCQB+M00KmIr/TYY5 qPEVbDn6GOPWOGh/bVb85GrY1kFBBg== =jDsH -----END PGP SIGNATURE----- --6ux5zkvmskhc7amk--