public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Michael Matz <matz@suse.de>
To: Cary Coutant <ccoutant@gmail.com>
Cc: x86-64-abi <x86-64-abi@googlegroups.com>,
	    Binutils <binutils@sourceware.org>,
	Jim Dehnert <dehnert@gmail.com>
Subject: Re: OR_AND semantics (was: GNU property saga)
Date: Wed, 06 Mar 2019 13:57:00 -0000	[thread overview]
Message-ID: <alpine.LSU.2.21.1903061340460.5354@wotan.suse.de> (raw)
In-Reply-To: <CAJimCsG7kvRPqnpZkk0eJFWbudS_0GcGqVtfnWL5xLLxBsqATQ@mail.gmail.com>

Hello,

On Mon, 4 Mar 2019, Cary Coutant wrote:

> I'm guessing that HJ is operating under the premise that if the older 
> producer B was unaware of bit 5 of FEATURE_X, then the object must not, 
> in fact, use that feature. His design is all-or-nothing: If the 
> FEATURE_X property is there, then we have accurate yes/no information 
> for each feature described by that property. That would work if he's 
> careful to move a new feature to a completely new FEATURE_Y property 
> whenever it's possible that an older consumer might have used that 
> feature before the means of recording it was defined.

Yes, that's the implicit assumption theory I had.

> Jim and I each suggested an improvement where each feature is described 
> by two bits: one bit from FEATURE_X_KNOWN and a corresponding bit from 
> FEATURE_X_USED*. The bits in FEATURE_X_KNOWN would be ANDed, while the 
> bits in FEATURE_X_USED would be ORed. This would give us the following 
> four cases:

And yes, that would be my cut at designing such property feature as well.  
One set of bits that spells out what can be relied upon, and another set 
of bits that contains the actual used/unused state.  Nice, easy, obvious.

> I was trying to understand why HJ didn't care about case (b) -- if a
> feature is used by at least one object, what difference does it make
> whether we have some objects that didn't say whether they used the
> feature? I believe his answer is that the use case for these
> properties is to allow the OS to decide whether it can allocate a
> program to a downgraded processor, based on whether we know for sure
> that the program does *not* use a particular feature. Thus, case (c)
> is the important one where the downgrade is feasible, and all other
> cases mean that it is not (either because we know the feature is used,
> or because we do not know it's not used).

That might be, but truth be told, I'm more comfortable with an orthogonal 
design that can express more than we need right now, than with a design 
where two concepts (known and used) are merged in a non-natural way.

HJ: what's your issue with the KNOWN+USED approach?  I would envision an 
encoding where e.g. even IDs encode the 32 KNOWN bits, and odd IDs encode 
the 32 USED bits.  Optionally we could retain the differentiation between 
OR vs. AND for the logical combination of the USED bits (where the KNOWN 
bits are always ANDed), though I'm not sure I would see the point for 
this.

I really have stomach aches with the current design of the properties.


Ciao,
Michael.

  reply	other threads:[~2019-03-06 13:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-04 17:25 GNU property saga Michael Matz
2019-03-04 17:40 ` OR_AND semantics (was: GNU property saga) Michael Matz
2019-03-05  0:48   ` Cary Coutant
2019-03-06 13:57     ` Michael Matz [this message]
2019-03-07  6:56       ` Cary Coutant
2019-03-08  3:44   ` H.J. Lu
2019-03-08  6:06     ` Cary Coutant
2019-03-08  6:25       ` Jim Dehnert
2019-03-11  7:34         ` H.J. Lu
2019-03-20 14:51 ` GNU property saga Mark Wielaard
     [not found]   ` <25adbffa-fc4c-1b01-7949-fbe0dc212f70@arm.com>
2019-05-10 18:37     ` Mark Wielaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LSU.2.21.1903061340460.5354@wotan.suse.de \
    --to=matz@suse.de \
    --cc=binutils@sourceware.org \
    --cc=ccoutant@gmail.com \
    --cc=dehnert@gmail.com \
    --cc=x86-64-abi@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).