> which shows each socket has its own dedicated L3 cache, and each
> core has its own L2 & L1 cache.
We need to also include the host cache ID value in the XML to
let us reliably distinguish / associate with differet cache
banks when placing guests, if there's multiple caches of the
same type associated with the same CPU.
<cache>
<bank id="0" type="l3" size="56320"
units="KiB" cpus="0,2,3,6,7,8"/>
<bank id="1" type="l3" size="56320"
units="KiB" cpus="0,2,3,6,7,8"/>
<bank id="2" type="l3" size="56320"
units="KiB"
cpus="3,4,5,9,10,11"/>
<bank id="3" type="l3" size="56320"
units="KiB"
cpus="3,4,5,9,10,11"/>
<bank id="4" type="l2" size="256"
units="KiB" cpus="0"/>
....
</cache>
> > 3. Add new virsh command 'nodecachestats':
> > This API is to expose vary cache resouce left on each hardware (cpu
socket).
> >
> > It will be formated as:
> >
> > <resource_type>.<resource_id>: left size KiB
> >
> > for example I have a 2 socket cpus host, and I'v enabled cat_l3
feature only
> >
> > root@s2600wt:~/linux# virsh nodecachestats
> > L3.0 : 56320 KiB
> > L3.1 : 56320 KiB
> >
> > P.S. resource_type can be L3, L3DATA, L3CODE, L2 for now.
>
> This feels like something we should have in the capabilities XML too
> rather than a new command
>
> <cache>
> <bank type="l3" size="56320" units="KiB"
cpus="0,2,3,6,7,8">
> <control unit="KiB" min="2816"
avail="56320/>
> </bank>
> <bank type="l3" size="56320" units="KiB"
cpus="3,4,5,9,10,11">
> <control unit="KiB" min="2816"
avail="56320"/>
> </bank>
> </cache>
Opps, ignore this. I remember the reason we always report available
resource separately from physically present resource, is that we
don't want to re-generate capabilities XML every time available
resource changes.
So, yes, we do need some API like virNodeFreeCache() / virs nodefreecache
yes, we need this.
We probably want to use an 2d array of typed parameters. The first
level of
the array would represent the cache bank, the second level woudl represent
the parameters for that bank. eg if we had 3 cache banks, we'd report a
3x3 typed parameter array, with parameters for the cache ID, its type and
the available / free size
id=0
type=l3
avail=56320
id=1
type=l3
avail=56320
id=2
type=l3
avail=56320
Regards,
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/
:|
|:
http://libvirt.org -o-
http://virt-manager.org
:|
|:
http://entangle-photo.org -o-
http://search.cpan.org/~danberr/
:|
--
Best regards
- Eli
天涯无处不重逢
a leaf duckweed belongs to the sea , where not to meet in life