From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752494AbbBEWZ2 (ORCPT ); Thu, 5 Feb 2015 17:25:28 -0500 Received: from mail-qg0-f53.google.com ([209.85.192.53]:56873 "EHLO mail-qg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751079AbbBEWZ0 (ORCPT ); Thu, 5 Feb 2015 17:25:26 -0500 Date: Thu, 5 Feb 2015 17:25:22 -0500 From: Tejun Heo To: Greg Thelen Cc: Konstantin Khlebnikov , Johannes Weiner , Michal Hocko , Cgroups , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Jan Kara , Dave Chinner , Jens Axboe , Christoph Hellwig , Li Zefan , Hugh Dickins Subject: Re: [RFC] Making memcg track ownership per address_space or anon_vma Message-ID: <20150205222522.GA10580@htj.dyndns.org> References: <20150130062737.GB25699@htj.dyndns.org> <20150130160722.GA26111@htj.dyndns.org> <54CFCF74.6090400@yandex-team.ru> <20150202194608.GA8169@htj.dyndns.org> <20150204170656.GA18858@htj.dyndns.org> <20150205131514.GD25736@htj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey, On Thu, Feb 05, 2015 at 02:05:19PM -0800, Greg Thelen wrote: > > A > > +-B (usage=2M lim=3M min=2M hosted_usage=2M) > > +-C (usage=0 lim=2M min=1M shared_usage=2M) > > +-D (usage=0 lim=2M min=1M shared_usage=2M) > > \-E (usage=0 lim=2M min=0) ... > Maybe, but I want to understand more about how pressure works in the > child. As C (or D) allocates non shared memory does it perform reclaim > to ensure that its (C.usage + C.shared_usage < C.lim). Given C's Yes. > shared_usage is linked into B.LRU it wouldn't be naturally reclaimable > by C. Are you thinking that charge failures on cgroups with non zero > shared_usage would, as needed, induce reclaim of parent's hosted_usage? Hmmm.... I'm not really sure but why not? If we properly account for the low protection when pushing inodes to the parent, I don't think it'd break anything. IOW, allow the amount beyond the sum of low limits to be reclaimed when one of the sharers is under pressure. Thanks. -- tejun From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qa0-f54.google.com (mail-qa0-f54.google.com [209.85.216.54]) by kanga.kvack.org (Postfix) with ESMTP id 46CD8828FD for ; Thu, 5 Feb 2015 17:25:27 -0500 (EST) Received: by mail-qa0-f54.google.com with SMTP id w8so8103353qac.13 for ; Thu, 05 Feb 2015 14:25:27 -0800 (PST) Received: from mail-qc0-x230.google.com (mail-qc0-x230.google.com. [2607:f8b0:400d:c01::230]) by mx.google.com with ESMTPS id h39si531960qgd.108.2015.02.05.14.25.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Feb 2015 14:25:26 -0800 (PST) Received: by mail-qc0-f176.google.com with SMTP id c9so8943049qcz.7 for ; Thu, 05 Feb 2015 14:25:25 -0800 (PST) Date: Thu, 5 Feb 2015 17:25:22 -0500 From: Tejun Heo Subject: Re: [RFC] Making memcg track ownership per address_space or anon_vma Message-ID: <20150205222522.GA10580@htj.dyndns.org> References: <20150130062737.GB25699@htj.dyndns.org> <20150130160722.GA26111@htj.dyndns.org> <54CFCF74.6090400@yandex-team.ru> <20150202194608.GA8169@htj.dyndns.org> <20150204170656.GA18858@htj.dyndns.org> <20150205131514.GD25736@htj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Greg Thelen Cc: Konstantin Khlebnikov , Johannes Weiner , Michal Hocko , Cgroups , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Jan Kara , Dave Chinner , Jens Axboe , Christoph Hellwig , Li Zefan , Hugh Dickins Hey, On Thu, Feb 05, 2015 at 02:05:19PM -0800, Greg Thelen wrote: > > A > > +-B (usage=2M lim=3M min=2M hosted_usage=2M) > > +-C (usage=0 lim=2M min=1M shared_usage=2M) > > +-D (usage=0 lim=2M min=1M shared_usage=2M) > > \-E (usage=0 lim=2M min=0) ... > Maybe, but I want to understand more about how pressure works in the > child. As C (or D) allocates non shared memory does it perform reclaim > to ensure that its (C.usage + C.shared_usage < C.lim). Given C's Yes. > shared_usage is linked into B.LRU it wouldn't be naturally reclaimable > by C. Are you thinking that charge failures on cgroups with non zero > shared_usage would, as needed, induce reclaim of parent's hosted_usage? Hmmm.... I'm not really sure but why not? If we properly account for the low protection when pushing inodes to the parent, I don't think it'd break anything. IOW, allow the amount beyond the sum of low limits to be reclaimed when one of the sharers is under pressure. Thanks. -- tejun -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [RFC] Making memcg track ownership per address_space or anon_vma Date: Thu, 5 Feb 2015 17:25:22 -0500 Message-ID: <20150205222522.GA10580@htj.dyndns.org> References: <20150130062737.GB25699@htj.dyndns.org> <20150130160722.GA26111@htj.dyndns.org> <54CFCF74.6090400@yandex-team.ru> <20150202194608.GA8169@htj.dyndns.org> <20150204170656.GA18858@htj.dyndns.org> <20150205131514.GD25736@htj.dyndns.org> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=IzC42CtKuf3buTw4WUxm98Uwgqy2e4TneHYq4Re4n54=; b=mRYVmgCcsYvD3/a60nd7BkQ3eranZM7i6m1coOUzwioTLAmtoy/jcy3FQTt0A4/Bi6 I7/Rizl1/u/DZeoQcFrI7s6Vovtcl/bNFna7pZY5TRJj8Qa68nMulrnk0nBBHnAKiLAd vLz3DabcyR2tA0iuIUKcZoViFxvu9AaVVnEBkoWTC48txQLOo+upL31sag/M9S77IwNq iBqKBxZyOW4FEgGHJ8MIR0wZxchJ6jenrvF8hs7wgaaxDQsYSMmWhIDOzfW+a9i4vnom CaABtxjGCP7lUvmgsohcEe1ht8kQRe3y06Z0Klu1BtBB0812iaYSJZRp3vvcsBxfyi0Q xnlQ== Content-Disposition: inline In-Reply-To: Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Greg Thelen Cc: Konstantin Khlebnikov , Johannes Weiner , Michal Hocko , Cgroups , "linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Jan Kara , Dave Chinner , Jens Axboe , Christoph Hellwig , Li Zefan , Hugh Dickins Hey, On Thu, Feb 05, 2015 at 02:05:19PM -0800, Greg Thelen wrote: > > A > > +-B (usage=2M lim=3M min=2M hosted_usage=2M) > > +-C (usage=0 lim=2M min=1M shared_usage=2M) > > +-D (usage=0 lim=2M min=1M shared_usage=2M) > > \-E (usage=0 lim=2M min=0) ... > Maybe, but I want to understand more about how pressure works in the > child. As C (or D) allocates non shared memory does it perform reclaim > to ensure that its (C.usage + C.shared_usage < C.lim). Given C's Yes. > shared_usage is linked into B.LRU it wouldn't be naturally reclaimable > by C. Are you thinking that charge failures on cgroups with non zero > shared_usage would, as needed, induce reclaim of parent's hosted_usage? Hmmm.... I'm not really sure but why not? If we properly account for the low protection when pushing inodes to the parent, I don't think it'd break anything. IOW, allow the amount beyond the sum of low limits to be reclaimed when one of the sharers is under pressure. Thanks. -- tejun