Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932825AbcDEOqO (ORCPT ); Tue, 5 Apr 2016 10:46:14 -0400 Received: from mail-yw0-f195.google.com ([209.85.161.195]:35854 "EHLO mail-yw0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752992AbcDEOqL (ORCPT ); Tue, 5 Apr 2016 10:46:11 -0400 Date: Tue, 5 Apr 2016 10:46:08 -0400 From: Tejun Heo To: Parav Pandit Cc: cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, lizefan@huawei.com, Johannes Weiner , Doug Ledford , Liran Liss , "Hefty, Sean" , Jason Gunthorpe , Haggai Eran , Jonathan Corbet , james.l.morris@oracle.com, serge@hallyn.com, Or Gerlitz , Matan Barak , akpm@linux-foundation.org, linux-security-module@vger.kernel.org Subject: Re: [PATCHv10 1/3] rdmacg: Added rdma cgroup controller Message-ID: <20160405144608.GD7822@mtj.duckdns.org> References: <1458850962-16057-1-git-send-email-pandit.parav@gmail.com> <1458850962-16057-2-git-send-email-pandit.parav@gmail.com> <20160404193640.GA7822@mtj.duckdns.org> <20160405012504.GG24661@htj.duckdns.org> <20160405140107.GB7822@mtj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1601 Lines: 44 Hello, Parav. On Tue, Apr 05, 2016 at 07:25:11AM -0700, Parav Pandit wrote: > > As it is a fairly isolated domain, to certain extent, it could be okay > > to let it go. At the same time, I know that these enterprise things > > tend to go completely wayward and am worried about individual drivers > > going crazy with custom attributes in a non-sensical way. > > If its crazy at driver level, I am sure it will be equally crazy for > any end-user too. Therefore no user would use those crazy resources > either. So, the above paragraph simply isn't true. It's not difficult to twist things bit so that things work in a hackish and often horrible way and we know this happens quite a bit, especially in enterprise settings. > Intent is certainly not for the individual drivers as we agreed in > past. You and I agreeing to that doesn't really matter all that much. > IB stack maintainers would be reviewing new enum addition > anyway, whether its verb or hw resource (unlikely). Well, if the additions are unlikely... > > In the original review message, I mentioned creating an interface > > which creates the hierarchy of objects as necessary and returns the > > target pool with lock held, can you please give it a shot? Something > > like the following. > > o.k. I will attempt. Looks doable. > I am on travel so it will take few more days for me to turn around > with below approach with tested code. So, if you go with single mutex, you don't really need get_and_lock semantics, you can just call the get function with mutex held. Please do whichever looks best. Thanks. -- tejun