From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753525AbdJMFaK (ORCPT ); Fri, 13 Oct 2017 01:30:10 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33153 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751192AbdJMFaJ (ORCPT ); Fri, 13 Oct 2017 01:30:09 -0400 X-Google-Smtp-Source: ABhQp+Tyz027xygE3XLHf7OUy21D+ItPmfX5q988RZ415i90F5fjBiqmMbHAhL42sLqYwRGweuLH2Q== Date: Fri, 13 Oct 2017 07:30:05 +0200 From: Ingo Molnar To: Thomas Gleixner Cc: Andi Kleen , x86@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen , Jonathan McDowell Subject: Re: [PATCH v9 2/5] x86/cpuid: Add generic table for cpuid dependencies Message-ID: <20171013053005.cj5vhqehkwlnhyla@gmail.com> References: <20171007000328.12843-1-andi@firstfloor.org> <20171007000328.12843-3-andi@firstfloor.org> <20171012080733.4y5wlghjr524cgr3@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Thomas Gleixner wrote: > On Thu, 12 Oct 2017, Ingo Molnar wrote: > > > > * Andi Kleen wrote: > > > > > --- /dev/null > > > +++ b/arch/x86/kernel/cpu/cpuid-deps.c > > > @@ -0,0 +1,109 @@ > > > +/* Declare dependencies between CPUIDs */ > > > +#include > > > +#include > > > +#include > > > +#include > > > + > > > +struct cpuid_dep { > > > + unsigned short feature; > > > + unsigned short depends; > > > +}; > > > > Why are these 16-bit fields? 16-bit data types should be avoided as much as > > possible, as they generate suboptimal code. > > I was looking at that as well and decided that we preferrably have a > compressed data structure. The code which walks the table is hardly > performance critical and the difference in text size is marginal. So the code should all be __init (once that is fixed), hence data and text size literally does not matter - it gets freed. So the only effect the 16-bit variables have is (marginally) worse boot times. Thanks, Ingo