From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCHv12 0/3] rdmacg: IB/core: rdma controller support Date: Thu, 10 Nov 2016 14:23:44 -0500 Message-ID: <20161110192344.GA4805@htj.duckdns.org> References: <20161110163837.GE28957@leon.nu> <20161110164638.GC26105@htj.duckdns.org> <20161110173217.GD26105@htj.duckdns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Parav Pandit Cc: Leon Romanovsky , Liran Liss , "cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , linux-rdma , Li Zefan , Johannes Weiner , Doug Ledford , Christoph Hellwig , "Hefty, Sean" , Jason Gunthorpe , Haggai Eran , "james.l.morris-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org" , Or Gerlitz , Matan Barak List-Id: linux-rdma@vger.kernel.org Hello, Parav. On Thu, Nov 10, 2016 at 11:26:28PM +0530, Parav Pandit wrote: > > That looks great to me from cgroup side. Do you have plans for > > exposing the maximum numbers available? > > If I have to expose max limits, I need new file interface as rdma.limit. > Because once rdma.max is set, user space cannot get back the old value. > It needs to cache it. user space tools might have been restarted and > so on, so store in other file etc. > So such user space solutions are just ugly. > > Getting and setting values in device agnostic way, through cgroup > files is desirable, however its not must. It can fallback on using > verb based API. > > So if there is no objection, I prefer to have rdma.limit file as > incremental patch once base version is merged. How about something like RESOURCE.available field in rdma.stat file? Its value can be what's maximally available at that level when max is unlimited and there is no competition. At top level cgroups, it'd be the total resources available in the system. At sub levels, it'd be min of what's available to the grandparent and parent's limit on the resource. This would be in line with cgroup conventions and would behave the same way nested making things easier for containers. Thanks. -- tejun