mem: Cleanup packet attributes and rely on command type
Review Request #3004 - Created Aug. 6, 2015 and discarded
Information | |
---|---|
Andreas Hansson | |
gem5 | |
default | |
Reviewers | |
Default | |
Changeset 11004:e6aa2b4cfbef --------------------------- mem: Cleanup packet attributes and rely on command type This patch takes one step further in cleaning up the use of packet command attributes, and shifts away from using attributes to distinguish a single command. The commands affected are software prefetch requests and flush requests. There is really no use for attributes, as no other request packets share this property. Instead of looking at the attribute, the locations that identified these packets now check for the actual command.
Ship It!
Ship It!
I confess to being confused by this patch---I thought the focus of the prior discussion was on all the flags in the Request object, but this change doesn't touch Request at all.
Note that, unlike Request flags, MemCmd attributes have no storage overhead, as they're just enum values. So I don't think there's much savings in getting rid of them. They also enable more orthogonality in the cache code. While none of the removed attributes is currently used in more than one command, I think it's pretty easy to imagine that the Prefetch flags could get reused if we introduced an exclusive prefetch, or implemented the MMX non-temporal prefetch instructions, or some other variant form of prefetch. It might even be the case that we could implement an exclusive prefetch today just by defining a new command that has both IsSWPrefetch and NeedsExclusive set. (OK, it's pretty optimistic to think that would work out of the box, but that's the kind of thing this structure is supposed to enable.)
Now the Request flags are another story in more ways than one... but I'll respond to that on the other thread.