Gentoo Archives: gentoo-dev

From: Andrew Savchenko <bircoph@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: Moving CPU flags into USE_EXPAND
Date: Fri, 23 Jan 2015 22:09:41
Message-Id: 20150124010930.0e2461d9998f40461ceaf6c3@gentoo.org
In Reply to: [gentoo-dev] Re: Moving CPU flags into USE_EXPAND by Duncan <1i5t5.duncan@cox.net>
1 On Wed, 21 Jan 2015 01:13:08 +0000 (UTC) Duncan wrote:
2 > Andrew Savchenko posted on Tue, 20 Jan 2015 23:59:23 +0300 as excerpted:
3 >
4 > > On Tue, 20 Jan 2015 12:17:35 -0800 Christopher Head wrote:
5 > >> On January 20, 2015 12:47:03 AM PST, Alexis Ballier
6 > >> <aballier@g.o> wrote:
7 > >> >So, you're telling me that if you have a list of 90 cpu extensions,
8 > >> >you will from time to time open that list to see if there is a 91st
9 > >> >one added ? I think most people won't even notice, at best they'll
10 > >> >look for the changelog.
11 > >>
12 > >> No, actually, I’m advocating the exact opposite. I’m saying that, as
13 > >> long as the list file is kept up to date, then I will look at those 90
14 > >> flags when I first install and never again. If a 91st flag appears some
15 > >> day, then as long as the file was maintained as I described in an
16 > >> earlier message (i.e. flags are added as soon as manufacturers announce
17 > >> features), I already know I can reliably ignore the new flag. After
18 > >> all,
19 > >> if the flag didn’t exist when I installed the system, then my CPU must
20 > >> necessarily not have that feature—unless CPUs are in the habit of
21 > >> sprouting new instructions after you buy them!
22 > >
23 > > Not exactly. CPUs are not in a habit, but software is. Some brand new
24 > > instuction set may be supported in (any of) packages with some delay.
25 > > Thus it is possible that instruction set supported by your CPU will
26 > > appear in the list of cpu flags after your ininial install.
27 >
28 > PMFJI...
29 >
30 > chead's idea is (I believe) simply to have the description file updated
31 > with all current hardware feature flags as soon as they are known (he
32 > said announced, but sometimes they change between announcement and
33 > actually appearing in hardware, so "known", as in "known to actually
34 > appear in hardware", would seem to be better).
35 >
36 > That way, no matter what the software supported at the time and what
37 > flags were thus actually used in packages, when someone first installs
38 > gentoo on a new machine, or when they first upgrade their CPU to
39 > something with new features, they can run the script and update their
40 > use_expand to match their hardware _ONCE_, without worrying about whether
41 > or when a package with support for it might appear.
42 >
43 > If no package with that support ever appears, no harm done, that entry in
44 > the use_expand is simply never used.
45 >
46 > OTOH when some package /does/ get support for new hardware instructions
47 > and adds the appropriate flag, it'll appear in portage's output, but
48 > because the use_expand was already set when gentoo was installed or the
49 > cpu upgraded, the user won't have to worry about needing to look it up
50 > and decide whether to set it, again, it'll already be done, back when the
51 > _hardware_ changed, _not_ sometime later, when the _software_ changed to
52 > support the new hardware.
53 >
54 > Of course if the user upgrades hardware after a package supports a
55 > feature, they'll have to upgrade their use_expand setting appropriately
56 > or miss support for the new instructions, but that's always the case.
57 > Just if handled as chead suggests, it'd be the case ONLY when the
58 > hardware is updated, instead of every time a package upgrades its own
59 > support.
60 >
61 > Correct, chead? Does that make things clearer, aballier and bircoph?
62
63 Yeah, thanks. I misunderstood original intention. It's all clear
64 now.
65
66 Best regards,
67 Andrew Savchenko