Received: by 10.223.185.116 with SMTP id b49csp584211wrg; Fri, 23 Feb 2018 03:40:14 -0800 (PST) X-Google-Smtp-Source: AH8x225pEtlJDlb60SnW+KRqsibf9ISGEyGwI7O3u2n4rtP4PO7KdX67MYeyrcS2hPk85cqyCmLA X-Received: by 10.99.8.4 with SMTP id 4mr1217711pgi.289.1519386014857; Fri, 23 Feb 2018 03:40:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519386014; cv=none; d=google.com; s=arc-20160816; b=dgzuS5Qh1R4UxsSOcvbBJWXECLvCRvhnvqDByBg7nXqIGHSMC6nZtLfEiqMPyujR2c s2U15phfSu998loo8JyVPgVbeDLwZUlBZSFYxqI8vvcA5sETEIUFxz6OpO58pS9iWhtE WCrHNqYeu2GAU0ZwMPMsXGBZ10qOhBe417Mw2SQBSHdvAZaATSMozmjgW+d8yhLDfpVz v2Y6P4TeEYHFRyYvFUynwu5Y8yY4XVPLxzPqL6e3WAAJD6W4e1/A9jSlIcnhv8THz6fx uR786YAK2TDL4aS9xwEX/Pj3hVXBS5LPLsFFAdM7ZbDxO7xQghZfOhPyaQuKdjHBaqr0 BUtQ== 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=g4/0MjVci/OaXq3Je8ZggHLltalbquWbJNFtqCARUL0=; b=nCI27KDRirRwPDdMBWoPTdEesgOl5E/KT/9tMHTrTRK8hEXKd4OwmHRbFPPi4k/RE3 UD9ayDLzvxmUnN1o/OouuLJbWLC1irjUtAETcWLLpI74uJKL3pGK4/C6vj8YRwsULpUT 53bGZumNb7M4syWL+HPySgD3y0A4JRPLu1DtpzRSfANhwys5CS1ycMYmKic7O+uJLh8U qQnAvslUTZqs1AwNdDZ3zHdJB7v4K8zcy4p7HK8dhiqiMnmEkJuzSQy3dTAkNy1nnKrU hCHc5J6Kl5T5LkPhjKAhrGWDFxh/DpFBIc3RlgZghiV79Kb22yYhXc/t3/DoOYSgyo1p tuUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=dAvB+bYX; 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 o12si1418738pgr.99.2018.02.23.03.40.00; Fri, 23 Feb 2018 03:40:14 -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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=dAvB+bYX; 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 S1751444AbeBWLiv (ORCPT + 99 others); Fri, 23 Feb 2018 06:38:51 -0500 Received: from merlin.infradead.org ([205.233.59.134]:33928 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750935AbeBWLiu (ORCPT ); Fri, 23 Feb 2018 06:38:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=g4/0MjVci/OaXq3Je8ZggHLltalbquWbJNFtqCARUL0=; b=dAvB+bYXWM6uNuKmZK3z6nvHk 6JM7gA7KOppJ2d+KN2RYoWx5Yw9hUyGYnWc8y+I9X2w99zrybxSqFBkbMPlaEh76jZSr91gBGtDUC T2V9n+5cYKJBzo3o9m8OFixoMQoXNHvHb0BR3WnHRFPaCoD9htPfbz9AjGMDV7d0vzSXAfuJSGhvi 2933A50GaPyyw1UyflXol7+G6dtUSpO6wVDdtSmw+2Z27oYYWO5Fj3+/z80ivSvZFxuJedqcKydEI HK1R7+k0QVw6/zHmAFvGuJnoNO769vnVjlKqkFSW3OjFYHuXUmj4C62R8UhTplt6nI4wJ6FNJG37f Ixpnwe2jQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.89 #1 (Red Hat Linux)) id 1epBgc-0008B8-8u; Fri, 23 Feb 2018 11:38:46 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id CAADD2029FD41; Fri, 23 Feb 2018 12:38:43 +0100 (CET) Date: Fri, 23 Feb 2018 12:38:43 +0100 From: Peter Zijlstra To: Boqun Feng 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: <20180223113843.GY25201@hirez.programming.kicks-ass.net> References: <20180222070904.548-1-boqun.feng@gmail.com> <20180222070904.548-16-boqun.feng@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180222070904.548-16-boqun.feng@gmail.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; 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).