[systemd-devel] [PATCH] systemd: add RDTCacheReservation= option to support CAT (Cache Allocation Technology)
Daniel P. Berrange
berrange at redhat.com
Mon Jan 9 15:00:59 UTC 2017
On Fri, Jan 06, 2017 at 01:51:17PM -0200, Marcelo Tosatti wrote:
> On Fri, Jan 06, 2017 at 05:26:36PM +0200, Mantas Mikulėnas wrote:
> > On Fri, Jan 6, 2017 at 3:59 PM, Marcelo Tosatti <mtosatti at redhat.com> wrote:
> >
> > >
> > >
> > > Cache Allocation Technology is a feature on selected recent Intel Xeon
> > > processors which allows control over L3 cache allocation.
> > >
> > > Kernel support has been merged to the upstream kernel, via a filesystem
> > > resctrlfs.
> > >
> > > On top of that, a userspace utility, resctrltool has been written
> > > to facilitate writing applications and using the filesystem
> > > interface (see the rationale at
> > > http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1300792.html).
> > >
> > > This patch adds a new option to systemd, RDTCacheReservation,
> > > to allow configuration of CAT via resctrltool.
> > >
> > > See the first hunk of the patch for a description of the option
> >
> >
> > This really doesn't look pretty, neither the approach nor the
> > implementation...
>
> Suggestions to improve the code or the approach are welcome.
>
> > Is the option actually so complex that calling resctrltool is the only way
> > to adjust it? What about writing to the resctrlfs directly?
>
> You'll have to deal with the issues that resctrltool deals with,
> namely:
>
> 1) Filesystem locking.
> 2) Reading in every directory and the default
> directory.
> 3) Converting the reservation request to proper sizes.
> 4) Converting:
> type=both --> type=data/type=code
>
> type=data/type=code --> type=both
>
> 4) Finding free space for the reservation.
> 5) Adjusting the default group reservation.
>
> Since this steps must be performed by every user of
> CAT (including libvirt which plans to execute resctrltool
> as well), it was decided its better to maintain this logic
> in a centralized place.
Errr, no, that's not correct - Libvirt is certainly not going to
spawn some python program to do this. If there's no C library API
for this, libvirt will simply implement all the logic itself.
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/ :|
More information about the systemd-devel
mailing list