Re: [PATCH v6 07/10] x86, mpx: decode MPX instruction to get bound violation information

From: H. Peter Anvin
Date: Thu Jun 19 2014 - 13:33:46 EST


On 06/19/2014 10:04 AM, Dave Hansen wrote:
>
> Could you please support this position with some data? I'm a bit
> skeptical that instruction decoding is going to be a
> performance-critical path.
>
> I also don't see the extra field that you talked about in the previous
> thread? What's the extra field? I see a 'limit' vs. 'length', but you
> don't use 'length' at all, so I think you can use it instead, or at
> least union it.
>
> I've taken a quick stab at trying to consolidate things. I think I may
> have screwed up this:
>
> insn->limit = MAX_MPX_INSN_SIZE - bytes;
>
> Qiaowei, is there anything fundamentally broken with what I've got here?
>

So I encouraged Qiaowei to do a limited special-purpose decoder, simply
because the glue to use the generic decoder was almost as large. I am
overall not a huge fan of using the generic decoder in constrained
situation, because the generic decoder is very heavyweight not just in
terms of performance but in terms of interface -- because it has to.

-hpa

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/