Re: [gem5-dev] Review Request: Config: Add support for a Self.all proxy object

2011-05-28 Thread Steve Reinhardt


> On 2011-05-28 17:22:15, Steve Reinhardt wrote:
> > src/sim/System.py, line 47
> > 
> >
> > It seems odd that Parent.any here will generate an error if there are 
> > multiple matches, but Self.all only is necessary if there are multiple 
> > matches.  I think the reason it's not a problem is that this Parent.any 
> > proxy on physmem is never used.  Should we get rid of it?
> 
> Ali Saidi wrote:
> You mean we set it to something and we should make it have no default? 
> Another option would be to change the way this works a bit. Just use the 
> memories above.

Getting rid of the Parent.any default would be one step; merging physmem and 
memories would be even better since they seem redundant, correct?  What about 
keeping the physmem name and replacing it with the definition you have for 
memories?


- Steve


---
This is an automatically generated e-mail. To reply, visit:
http://reviews.m5sim.org/r/720/#review1272
---


On 2011-05-26 19:17:18, Ali Saidi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.m5sim.org/r/720/
> ---
> 
> (Updated 2011-05-26 19:17:18)
> 
> 
> Review request for Default, Ali Saidi, Gabe Black, Steve Reinhardt, and 
> Nathan Binkert.
> 
> 
> Summary
> ---
> 
> Config: Add support for a Self.all proxy object
> 
> 
> Diffs
> -
> 
>   src/python/m5/SimObject.py 3f37cc5d25bc 
>   src/python/m5/params.py 3f37cc5d25bc 
>   src/python/m5/proxy.py 3f37cc5d25bc 
>   src/sim/System.py 3f37cc5d25bc 
> 
> Diff: http://reviews.m5sim.org/r/720/diff
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Ali
> 
>

___
gem5-dev mailing list
gem5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request: Config: Add support for a Self.all proxy object

2011-05-28 Thread Ali Saidi


> On 2011-05-28 17:22:15, Steve Reinhardt wrote:
> > src/sim/System.py, line 47
> > 
> >
> > It seems odd that Parent.any here will generate an error if there are 
> > multiple matches, but Self.all only is necessary if there are multiple 
> > matches.  I think the reason it's not a problem is that this Parent.any 
> > proxy on physmem is never used.  Should we get rid of it?

You mean we set it to something and we should make it have no default? Another 
option would be to change the way this works a bit. Just use the memories 
above. 


- Ali


---
This is an automatically generated e-mail. To reply, visit:
http://reviews.m5sim.org/r/720/#review1272
---


On 2011-05-26 19:17:18, Ali Saidi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.m5sim.org/r/720/
> ---
> 
> (Updated 2011-05-26 19:17:18)
> 
> 
> Review request for Default, Ali Saidi, Gabe Black, Steve Reinhardt, and 
> Nathan Binkert.
> 
> 
> Summary
> ---
> 
> Config: Add support for a Self.all proxy object
> 
> 
> Diffs
> -
> 
>   src/python/m5/SimObject.py 3f37cc5d25bc 
>   src/python/m5/params.py 3f37cc5d25bc 
>   src/python/m5/proxy.py 3f37cc5d25bc 
>   src/sim/System.py 3f37cc5d25bc 
> 
> Diff: http://reviews.m5sim.org/r/720/diff
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Ali
> 
>

___
gem5-dev mailing list
gem5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request: Config: Add support for a Self.all proxy object

2011-05-28 Thread Steve Reinhardt

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.m5sim.org/r/720/#review1272
---



src/sim/System.py


It seems odd that Parent.any here will generate an error if there are 
multiple matches, but Self.all only is necessary if there are multiple matches. 
 I think the reason it's not a problem is that this Parent.any proxy on physmem 
is never used.  Should we get rid of it?


- Steve


On 2011-05-26 19:17:18, Ali Saidi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.m5sim.org/r/720/
> ---
> 
> (Updated 2011-05-26 19:17:18)
> 
> 
> Review request for Default, Ali Saidi, Gabe Black, Steve Reinhardt, and 
> Nathan Binkert.
> 
> 
> Summary
> ---
> 
> Config: Add support for a Self.all proxy object
> 
> 
> Diffs
> -
> 
>   src/python/m5/SimObject.py 3f37cc5d25bc 
>   src/python/m5/params.py 3f37cc5d25bc 
>   src/python/m5/proxy.py 3f37cc5d25bc 
>   src/sim/System.py 3f37cc5d25bc 
> 
> Diff: http://reviews.m5sim.org/r/720/diff
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Ali
> 
>

___
gem5-dev mailing list
gem5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request: Config: Add support for a Self.all proxy object

2011-05-28 Thread Steve Reinhardt


> On 2011-05-28 09:20:00, Ali Saidi wrote:
> > src/python/m5/proxy.py, line 187
> > 
> >
> > Parent.all would find every object above you in the hierarchy that 
> > matched, although I've never tried it. I only use self.all..
> > 
> > I can add a description for those two. Will you add one for the rest of 
> > the proxy objets? :)

After looking at BaseProxy.unproxy(), I'm pretty sure Parent.all will not work, 
since the base algorithm quits as soon as it sees a find() method return True.  
I don't think that's a huge problem, but it would be good to find a way to 
return an error on Parent.all instead of letting people find out the hard way 
that it doesn't work.


> On 2011-05-28 09:20:00, Ali Saidi wrote:
> > src/python/m5/params.py, line 187
> > 
> >
> > The all proxy object is going to return an array which in then going to 
> > get turned into [[all,objects,that,match]]. we don't want this.

I understand why this code is necessary, but that doesn't mean I like it ;-).  
It seems like an arbitrary hack that could possibly turn around and bite us at 
some point.

Basically the current code assumes that a proxied VectorParam is a vector of 
scalar proxies, not a single proxy object that's going to return a vector of 
things.  This code assumes that if the first element of the unproxied vector is 
a vector, then you really want that and not the original vector.  Seems a 
little broad to me.  How about something like:

if len(self) == 1 and isinstance(self[0], AllProxy):
return self[0].unproxy(base)
else:
return [v.unproxy(base) for v in self]


- Steve


---
This is an automatically generated e-mail. To reply, visit:
http://reviews.m5sim.org/r/720/#review1269
---


On 2011-05-26 19:17:18, Ali Saidi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.m5sim.org/r/720/
> ---
> 
> (Updated 2011-05-26 19:17:18)
> 
> 
> Review request for Default, Ali Saidi, Gabe Black, Steve Reinhardt, and 
> Nathan Binkert.
> 
> 
> Summary
> ---
> 
> Config: Add support for a Self.all proxy object
> 
> 
> Diffs
> -
> 
>   src/python/m5/SimObject.py 3f37cc5d25bc 
>   src/python/m5/params.py 3f37cc5d25bc 
>   src/python/m5/proxy.py 3f37cc5d25bc 
>   src/sim/System.py 3f37cc5d25bc 
> 
> Diff: http://reviews.m5sim.org/r/720/diff
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Ali
> 
>

___
gem5-dev mailing list
gem5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request: Config: Add support for a Self.all proxy object

2011-05-28 Thread Ali Saidi


> On 2011-05-27 20:10:01, Nathan Binkert wrote:
> > src/python/m5/SimObject.py, line 729
> > 
> >
> > Does this do what you want?  It doesn't seem like it would recurse down 
> > the tree and find all nodes that match (or does it?)

It works. I've been using it for 2 weeks without issues and all the regressions 
pass. 


- Ali


---
This is an automatically generated e-mail. To reply, visit:
http://reviews.m5sim.org/r/720/#review1265
---


On 2011-05-26 19:17:18, Ali Saidi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.m5sim.org/r/720/
> ---
> 
> (Updated 2011-05-26 19:17:18)
> 
> 
> Review request for Default, Ali Saidi, Gabe Black, Steve Reinhardt, and 
> Nathan Binkert.
> 
> 
> Summary
> ---
> 
> Config: Add support for a Self.all proxy object
> 
> 
> Diffs
> -
> 
>   src/python/m5/SimObject.py 3f37cc5d25bc 
>   src/python/m5/params.py 3f37cc5d25bc 
>   src/python/m5/proxy.py 3f37cc5d25bc 
>   src/sim/System.py 3f37cc5d25bc 
> 
> Diff: http://reviews.m5sim.org/r/720/diff
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Ali
> 
>

___
gem5-dev mailing list
gem5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request: Config: Add support for a Self.all proxy object

2011-05-28 Thread Ali Saidi


> On 2011-05-26 23:29:05, Gabe Black wrote:
> > What does Self.all do? What is it for? You have one use in the change so I 
> > have a basic idea, but it would be helpful to know the specifics.
> 
> Ali Saidi wrote:
> It's similar to Parent.any in that it traverses the object hierarchy and 
> finds all  (as opposed to one) objects that are of a certain type.  As you 
> see from the memories example, the system object can have a pointer to all 
> PhysicalMemory objects that belong to that system. The reason to add 
> something like this, is to have a generic way to prevent speculation from 
> touching I/O. It's possible for a speculative instruction fetch to sneak out 
> of the CPU if the wrong 10 things all happen an once and with this another 
> change can prevent that (will post soon). It's not as simple as just not 
> fetching from non-cacheable memory, since most architectures start their 
> processors in some kind of caches disabled, tlb should only issue 
> non-cachable transaction state.
> 
> Steve Reinhardt wrote:
> So if the real machine is using speculative execution in this 
> cache-disable mode, how does it avoid touching I/O locations?

i would guess that when it sees non-cachable memory it only executes one 
instruction at a time or something, but that would be incredibly difficult to 
retrofit the o3 model to be able to do.


- Ali


---
This is an automatically generated e-mail. To reply, visit:
http://reviews.m5sim.org/r/720/#review1262
---


On 2011-05-26 19:17:18, Ali Saidi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.m5sim.org/r/720/
> ---
> 
> (Updated 2011-05-26 19:17:18)
> 
> 
> Review request for Default, Ali Saidi, Gabe Black, Steve Reinhardt, and 
> Nathan Binkert.
> 
> 
> Summary
> ---
> 
> Config: Add support for a Self.all proxy object
> 
> 
> Diffs
> -
> 
>   src/python/m5/SimObject.py 3f37cc5d25bc 
>   src/python/m5/params.py 3f37cc5d25bc 
>   src/python/m5/proxy.py 3f37cc5d25bc 
>   src/sim/System.py 3f37cc5d25bc 
> 
> Diff: http://reviews.m5sim.org/r/720/diff
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Ali
> 
>

___
gem5-dev mailing list
gem5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request: Config: Add support for a Self.all proxy object

2011-05-28 Thread Ali Saidi

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.m5sim.org/r/720/#review1269
---



src/python/m5/params.py


The all proxy object is going to return an array which in then going to get 
turned into [[all,objects,that,match]]. we don't want this.



src/python/m5/proxy.py


Parent.all would find every object above you in the hierarchy that matched, 
although I've never tried it. I only use self.all..

I can add a description for those two. Will you add one for the rest of the 
proxy objets? :)


- Ali


On 2011-05-26 19:17:18, Ali Saidi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.m5sim.org/r/720/
> ---
> 
> (Updated 2011-05-26 19:17:18)
> 
> 
> Review request for Default, Ali Saidi, Gabe Black, Steve Reinhardt, and 
> Nathan Binkert.
> 
> 
> Summary
> ---
> 
> Config: Add support for a Self.all proxy object
> 
> 
> Diffs
> -
> 
>   src/python/m5/SimObject.py 3f37cc5d25bc 
>   src/python/m5/params.py 3f37cc5d25bc 
>   src/python/m5/proxy.py 3f37cc5d25bc 
>   src/sim/System.py 3f37cc5d25bc 
> 
> Diff: http://reviews.m5sim.org/r/720/diff
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Ali
> 
>

___
gem5-dev mailing list
gem5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request: Config: Add support for a Self.all proxy object

2011-05-27 Thread Steve Reinhardt


> On 2011-05-26 23:29:05, Gabe Black wrote:
> > What does Self.all do? What is it for? You have one use in the change so I 
> > have a basic idea, but it would be helpful to know the specifics.
> 
> Ali Saidi wrote:
> It's similar to Parent.any in that it traverses the object hierarchy and 
> finds all  (as opposed to one) objects that are of a certain type.  As you 
> see from the memories example, the system object can have a pointer to all 
> PhysicalMemory objects that belong to that system. The reason to add 
> something like this, is to have a generic way to prevent speculation from 
> touching I/O. It's possible for a speculative instruction fetch to sneak out 
> of the CPU if the wrong 10 things all happen an once and with this another 
> change can prevent that (will post soon). It's not as simple as just not 
> fetching from non-cacheable memory, since most architectures start their 
> processors in some kind of caches disabled, tlb should only issue 
> non-cachable transaction state.

So if the real machine is using speculative execution in this cache-disable 
mode, how does it avoid touching I/O locations?


- Steve


---
This is an automatically generated e-mail. To reply, visit:
http://reviews.m5sim.org/r/720/#review1262
---


On 2011-05-26 19:17:18, Ali Saidi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.m5sim.org/r/720/
> ---
> 
> (Updated 2011-05-26 19:17:18)
> 
> 
> Review request for Default, Ali Saidi, Gabe Black, Steve Reinhardt, and 
> Nathan Binkert.
> 
> 
> Summary
> ---
> 
> Config: Add support for a Self.all proxy object
> 
> 
> Diffs
> -
> 
>   src/python/m5/SimObject.py 3f37cc5d25bc 
>   src/python/m5/params.py 3f37cc5d25bc 
>   src/python/m5/proxy.py 3f37cc5d25bc 
>   src/sim/System.py 3f37cc5d25bc 
> 
> Diff: http://reviews.m5sim.org/r/720/diff
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Ali
> 
>

___
gem5-dev mailing list
gem5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request: Config: Add support for a Self.all proxy object

2011-05-27 Thread Nathan Binkert

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.m5sim.org/r/720/#review1265
---



src/python/m5/SimObject.py


Does this do what you want?  It doesn't seem like it would recurse down the 
tree and find all nodes that match (or does it?)



src/python/m5/params.py


what exactly is this doing?  Also, what happens if val is of length 2 and 
the first element is a list or tuple?  Seems like an error condition or you're 
doing something wrong.



src/python/m5/proxy.py


Seems like Mr Doxygen should be documenting this file a bit better :)

Also, what does Parent.all do?  It'd be nice if you described Self.all and 
Parent.all in this file.


- Nathan


On 2011-05-26 19:17:18, Ali Saidi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.m5sim.org/r/720/
> ---
> 
> (Updated 2011-05-26 19:17:18)
> 
> 
> Review request for Default, Ali Saidi, Gabe Black, Steve Reinhardt, and 
> Nathan Binkert.
> 
> 
> Summary
> ---
> 
> Config: Add support for a Self.all proxy object
> 
> 
> Diffs
> -
> 
>   src/python/m5/SimObject.py 3f37cc5d25bc 
>   src/python/m5/params.py 3f37cc5d25bc 
>   src/python/m5/proxy.py 3f37cc5d25bc 
>   src/sim/System.py 3f37cc5d25bc 
> 
> Diff: http://reviews.m5sim.org/r/720/diff
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Ali
> 
>

___
gem5-dev mailing list
gem5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request: Config: Add support for a Self.all proxy object

2011-05-27 Thread Ali Saidi


> On 2011-05-26 23:29:05, Gabe Black wrote:
> > What does Self.all do? What is it for? You have one use in the change so I 
> > have a basic idea, but it would be helpful to know the specifics.

It's similar to Parent.any in that it traverses the object hierarchy and finds 
all  (as opposed to one) objects that are of a certain type.  As you see from 
the memories example, the system object can have a pointer to all 
PhysicalMemory objects that belong to that system. The reason to add something 
like this, is to have a generic way to prevent speculation from touching I/O. 
It's possible for a speculative instruction fetch to sneak out of the CPU if 
the wrong 10 things all happen an once and with this another change can prevent 
that (will post soon). It's not as simple as just not fetching from 
non-cacheable memory, since most architectures start their processors in some 
kind of caches disabled, tlb should only issue non-cachable transaction state.


- Ali


---
This is an automatically generated e-mail. To reply, visit:
http://reviews.m5sim.org/r/720/#review1262
---


On 2011-05-26 19:17:18, Ali Saidi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.m5sim.org/r/720/
> ---
> 
> (Updated 2011-05-26 19:17:18)
> 
> 
> Review request for Default, Ali Saidi, Gabe Black, Steve Reinhardt, and 
> Nathan Binkert.
> 
> 
> Summary
> ---
> 
> Config: Add support for a Self.all proxy object
> 
> 
> Diffs
> -
> 
>   src/python/m5/SimObject.py 3f37cc5d25bc 
>   src/python/m5/params.py 3f37cc5d25bc 
>   src/python/m5/proxy.py 3f37cc5d25bc 
>   src/sim/System.py 3f37cc5d25bc 
> 
> Diff: http://reviews.m5sim.org/r/720/diff
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Ali
> 
>

___
gem5-dev mailing list
gem5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request: Config: Add support for a Self.all proxy object

2011-05-26 Thread Gabe Black

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.m5sim.org/r/720/#review1262
---


What does Self.all do? What is it for? You have one use in the change so I have 
a basic idea, but it would be helpful to know the specifics.

- Gabe


On 2011-05-26 19:17:18, Ali Saidi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.m5sim.org/r/720/
> ---
> 
> (Updated 2011-05-26 19:17:18)
> 
> 
> Review request for Default, Ali Saidi, Gabe Black, Steve Reinhardt, and 
> Nathan Binkert.
> 
> 
> Summary
> ---
> 
> Config: Add support for a Self.all proxy object
> 
> 
> Diffs
> -
> 
>   src/python/m5/SimObject.py 3f37cc5d25bc 
>   src/python/m5/params.py 3f37cc5d25bc 
>   src/python/m5/proxy.py 3f37cc5d25bc 
>   src/sim/System.py 3f37cc5d25bc 
> 
> Diff: http://reviews.m5sim.org/r/720/diff
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Ali
> 
>

___
gem5-dev mailing list
gem5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/gem5-dev


[gem5-dev] Review Request: Config: Add support for a Self.all proxy object

2011-05-26 Thread Ali Saidi

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.m5sim.org/r/720/
---

Review request for Default, Ali Saidi, Gabe Black, Steve Reinhardt, and Nathan 
Binkert.


Summary
---

Config: Add support for a Self.all proxy object


Diffs
-

  src/python/m5/SimObject.py 3f37cc5d25bc 
  src/python/m5/params.py 3f37cc5d25bc 
  src/python/m5/proxy.py 3f37cc5d25bc 
  src/sim/System.py 3f37cc5d25bc 

Diff: http://reviews.m5sim.org/r/720/diff


Testing
---


Thanks,

Ali

___
gem5-dev mailing list
gem5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/gem5-dev