From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933560AbcDEOHN (ORCPT ); Tue, 5 Apr 2016 10:07:13 -0400 Received: from mail-yw0-f194.google.com ([209.85.161.194]:33946 "EHLO mail-yw0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759019AbcDEOHH (ORCPT ); Tue, 5 Apr 2016 10:07:07 -0400 Date: Tue, 5 Apr 2016 10:07:04 -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: <20160405140704.GC7822@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: <20160405140107.GB7822@mtj.duckdns.org> 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 Just one more thing. On Tue, Apr 05, 2016 at 10:01:07AM -0400, Tejun Heo wrote: ... > > pool_info in spin lock context, made me allocate memory to get all > > values upfront through allocation. > > Now that the lock is going away, I can do what you have described above. So, this might be okay depending on the use case but it often becomes painful to require sleeping context for freeing resources. If you're certain that requiring sleeping context is okay for all paths, using a single mutex is fine but *usually* it isn't a great idea. Thanks. -- tejun