From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753443AbcAGUlP (ORCPT ); Thu, 7 Jan 2016 15:41:15 -0500 Received: from mail-yk0-f170.google.com ([209.85.160.170]:36269 "EHLO mail-yk0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752492AbcAGUlM (ORCPT ); Thu, 7 Jan 2016 15:41:12 -0500 Date: Thu, 7 Jan 2016 15:41:10 -0500 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 , raindel@mellanox.com, akpm@linux-foundation.org, linux-security-module@vger.kernel.org Subject: Re: [PATCHv1 3/6] rdmacg: implements rdma cgroup Message-ID: <20160107204110.GH1898@mtj.duckdns.org> References: <1452020286-9508-1-git-send-email-pandit.parav@gmail.com> <1452020286-9508-4-git-send-email-pandit.parav@gmail.com> <20160105220128.GJ5995@mtj.duckdns.org> <20160107152936.GE29797@mtj.duckdns.org> <20160107202818.GF1898@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 Hello, Parav. On Fri, Jan 08, 2016 at 02:09:23AM +0530, Parav Pandit wrote: > > Hmmm, what happens after the following? > > > > 1. A process allocates some rdma resources and get registered on the > > hash table. > > > > 2. The process gets migrated to a different cgroup. > > > > 3. The process allocates more rdma resources. > > > > Which cgroup would the resources from #3 be attributed to? > > Since the pid/tgid of the process doesn't change in step_3, it > allocates from original cgroup of step_1. It shouldn't work that way. > However in next patch V2, as described below, since IB resource will > store rdma_cg pointer, > in step_3, new resource will be allocated from new cgroup. > old resource will be freed from older cgroup. > This is what you are expecting, right? Yeap. Thanks. -- tejun