From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161512AbbBDS2R (ORCPT ); Wed, 4 Feb 2015 13:28:17 -0500 Received: from mail-qc0-f175.google.com ([209.85.216.175]:61654 "EHLO mail-qc0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161333AbbBDS2Q (ORCPT ); Wed, 4 Feb 2015 13:28:16 -0500 Date: Wed, 4 Feb 2015 13:28:11 -0500 From: Tejun Heo To: Konstantin Khlebnikov Cc: Greg Thelen , 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 , Roman Gushchin Subject: Re: [RFC] Making memcg track ownership per address_space or anon_vma Message-ID: <20150204182811.GC18858@htj.dyndns.org> References: <20150130044324.GA25699@htj.dyndns.org> <20150130062737.GB25699@htj.dyndns.org> <20150130160722.GA26111@htj.dyndns.org> <54CFCF74.6090400@yandex-team.ru> <20150202194608.GA8169@htj.dyndns.org> <54D1F924.5000001@yandex-team.ru> <20150204171512.GB18858@htj.dyndns.org> <54D25DBD.5080009@yandex-team.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54D25DBD.5080009@yandex-team.ru> 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 On Wed, Feb 04, 2015 at 08:58:21PM +0300, Konstantin Khlebnikov wrote: > >>Generally incidental sharing could be handled as temporary sharing: > >>default policy (if inode isn't pinned to memory cgroup) after some > >>time should detect that inode is no longer shared and migrate it into > >>original cgroup. Of course task could provide hit: O_NO_MOVEMEM or > >>even while memory cgroup where it runs could be marked as "scanner" > >>which shouldn't disturb memory classification. > > > >Ditto for annotating each file individually. Let's please try to stay > >away from things like that. That's mostly a cop-out which is unlikely > >to actually benefit the majority of users. > > Process which scans all files once isn't so rare use case. > Linux still cannot handle this pattern sometimes. Yeah, sure, tagging usages with m/fadvise's is fine. We can just look at the policy and ignore them for the purpose of determining who's using the inode, but let's stay away from tagging the files on filesystem if at all possible. Thanks. -- tejun From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qa0-f53.google.com (mail-qa0-f53.google.com [209.85.216.53]) by kanga.kvack.org (Postfix) with ESMTP id 32FC7900015 for ; Wed, 4 Feb 2015 13:28:16 -0500 (EST) Received: by mail-qa0-f53.google.com with SMTP id n4so2380713qaq.12 for ; Wed, 04 Feb 2015 10:28:16 -0800 (PST) Received: from mail-qa0-x22f.google.com (mail-qa0-x22f.google.com. [2607:f8b0:400d:c00::22f]) by mx.google.com with ESMTPS id v5si2802272qat.109.2015.02.04.10.28.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Feb 2015 10:28:15 -0800 (PST) Received: by mail-qa0-f47.google.com with SMTP id n8so2402360qaq.6 for ; Wed, 04 Feb 2015 10:28:15 -0800 (PST) Date: Wed, 4 Feb 2015 13:28:11 -0500 From: Tejun Heo Subject: Re: [RFC] Making memcg track ownership per address_space or anon_vma Message-ID: <20150204182811.GC18858@htj.dyndns.org> References: <20150130044324.GA25699@htj.dyndns.org> <20150130062737.GB25699@htj.dyndns.org> <20150130160722.GA26111@htj.dyndns.org> <54CFCF74.6090400@yandex-team.ru> <20150202194608.GA8169@htj.dyndns.org> <54D1F924.5000001@yandex-team.ru> <20150204171512.GB18858@htj.dyndns.org> <54D25DBD.5080009@yandex-team.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54D25DBD.5080009@yandex-team.ru> Sender: owner-linux-mm@kvack.org List-ID: To: Konstantin Khlebnikov Cc: Greg Thelen , 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 , Roman Gushchin On Wed, Feb 04, 2015 at 08:58:21PM +0300, Konstantin Khlebnikov wrote: > >>Generally incidental sharing could be handled as temporary sharing: > >>default policy (if inode isn't pinned to memory cgroup) after some > >>time should detect that inode is no longer shared and migrate it into > >>original cgroup. Of course task could provide hit: O_NO_MOVEMEM or > >>even while memory cgroup where it runs could be marked as "scanner" > >>which shouldn't disturb memory classification. > > > >Ditto for annotating each file individually. Let's please try to stay > >away from things like that. That's mostly a cop-out which is unlikely > >to actually benefit the majority of users. > > Process which scans all files once isn't so rare use case. > Linux still cannot handle this pattern sometimes. Yeah, sure, tagging usages with m/fadvise's is fine. We can just look at the policy and ignore them for the purpose of determining who's using the inode, but let's stay away from tagging the files on filesystem if at all possible. 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: Wed, 4 Feb 2015 13:28:11 -0500 Message-ID: <20150204182811.GC18858@htj.dyndns.org> References: <20150130044324.GA25699@htj.dyndns.org> <20150130062737.GB25699@htj.dyndns.org> <20150130160722.GA26111@htj.dyndns.org> <54CFCF74.6090400@yandex-team.ru> <20150202194608.GA8169@htj.dyndns.org> <54D1F924.5000001@yandex-team.ru> <20150204171512.GB18858@htj.dyndns.org> <54D25DBD.5080009@yandex-team.ru> 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=YmXJcAu8dduYMXQFz1MYjADgnQL7a6KeRlHNJ83+DWw=; b=OzBdtd6M+vLQLgk5rUTS84chklCNx3WKSyGO5thgDyO3zTFoISFVO+MLCGlz6Rw0Gt TScXAmY32dgoQjIXIAs9sw11oqSA7KuS/s6FyIL22CO+OPj2ljlUuQPh59U9fyC1F05U EOFMqOYIb3ihtKsdGk3dVO321jMLEVRj3IgWJa8Xr55fsJdD68uabT9sedag1lAL5wFF zXTRY6C8AB5dTFIzoJ3QOMcC9XjBA1oWyG/3A5JKxNiJ7fbQ0e8y/Fv3KRNs8lfqqy04 19wEJO2+RUTUOApLB5jtFBRyl57IZzgusbbuKa4zcmbzRDrBagtHzAJxdxYCNFqpLwt6 N8Zw== Content-Disposition: inline In-Reply-To: <54D25DBD.5080009-XoJtRXgx1JseBXzfvpsJ4g@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Konstantin Khlebnikov Cc: Greg Thelen , 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 , Roman Gushchin On Wed, Feb 04, 2015 at 08:58:21PM +0300, Konstantin Khlebnikov wrote: > >>Generally incidental sharing could be handled as temporary sharing: > >>default policy (if inode isn't pinned to memory cgroup) after some > >>time should detect that inode is no longer shared and migrate it into > >>original cgroup. Of course task could provide hit: O_NO_MOVEMEM or > >>even while memory cgroup where it runs could be marked as "scanner" > >>which shouldn't disturb memory classification. > > > >Ditto for annotating each file individually. Let's please try to stay > >away from things like that. That's mostly a cop-out which is unlikely > >to actually benefit the majority of users. > > Process which scans all files once isn't so rare use case. > Linux still cannot handle this pattern sometimes. Yeah, sure, tagging usages with m/fadvise's is fine. We can just look at the policy and ignore them for the purpose of determining who's using the inode, but let's stay away from tagging the files on filesystem if at all possible. Thanks. -- tejun