Received: by 10.223.185.116 with SMTP id b49csp1039494wrg; Wed, 21 Feb 2018 11:01:50 -0800 (PST) X-Google-Smtp-Source: AH8x225FMek0fPa9Kkn80qiLaHkbqgpi1I/0AvccVNI1J3r3duJoVDXX/TeNeGT5wLUf9H4V9Dwk X-Received: by 2002:a17:902:4545:: with SMTP id m63-v6mr3933570pld.15.1519239710699; Wed, 21 Feb 2018 11:01:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519239710; cv=none; d=google.com; s=arc-20160816; b=UJnEJ/9b1LhLOSM1TyKKcCbzFAhKfPhysgp4bDGcc587L1bS1SUnTe7WWYd6GVV0g5 5redAYwG0+Ci1TOIVovY7YvUEjOoOdTa45Mch+lcJM2QOGhOroP1KdiwPVN/4PV/AJ9W wPYjcJoxVLmPVkb+j0hHAK4vRg0mpp1sNbUzHLfFYovGDr6HPyo/o7m+XCAKy3f5jL2p 4Vskwnx18iNq6H7LoOo9t+R5x3ML/JL82TDS6rXn8MdlOFQRf0T/rTtLziCYEUIGtrd/ DX2esm6Y2v2zZuo4zegLcfy18XDt0c2OWrgfPLDHjuihX91NJzlMmq4JK7Q75DGg/Jq0 z6og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=9+t5gBu2LppJ340sAzhuhAke6Vct0QexWodSXG7Yasg=; b=efUDLhm1PUbeSWB8tpSIRUCsqZ8X31FWkeFeylYVRlknrN6NFF5WdcBl0PvNGqtl9G wdfnROtsLbRZ3wgThfBOKALkcil0Mv21a9WNLavuCipVgyJIxsupkX0SnxihSFrwL94m yLInK4xZ08ROH4vn5z6uAzfC4iz43sR2xQbVJfPdRfX2WjtWFGGn7wYZVLMKKCfIee0e OYw27MN3tgEzWVrIn4RiK3U+p484qkcyL7duJ7eHQg8r0SkDEcAcPEA9LzSGf2vdiqvb qHUn1Lg/qhSmiHLtakp9XGWBHhyr0UnVNyPqmL1R8p+2ORRfZYIqrAsXl7j10HicQ7Vb o1IQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s1-v6si7815361plk.234.2018.02.21.11.01.35; Wed, 21 Feb 2018 11:01:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934587AbeBUQSI (ORCPT + 99 others); Wed, 21 Feb 2018 11:18:08 -0500 Received: from resqmta-po-07v.sys.comcast.net ([96.114.154.166]:58046 "EHLO resqmta-po-07v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966324AbeBUQSF (ORCPT ); Wed, 21 Feb 2018 11:18:05 -0500 X-Greylist: delayed 488 seconds by postgrey-1.27 at vger.kernel.org; Wed, 21 Feb 2018 11:18:05 EST Received: from resomta-po-17v.sys.comcast.net ([96.114.154.241]) by resqmta-po-07v.sys.comcast.net with ESMTP id oWxweYWEqDQI9oWxweX2WD; Wed, 21 Feb 2018 16:09:56 +0000 Received: from gentwo.org ([98.222.162.64]) by resomta-po-17v.sys.comcast.net with SMTP id oWxtezxAaQfGxoWxue4Odl; Wed, 21 Feb 2018 16:09:56 +0000 Received: by gentwo.org (Postfix, from userid 1001) id 8629F116013F; Wed, 21 Feb 2018 10:09:53 -0600 (CST) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 82D88116010E; Wed, 21 Feb 2018 10:09:53 -0600 (CST) Date: Wed, 21 Feb 2018 10:09:53 -0600 (CST) From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Shakeel Butt cc: Jan Kara , Amir Goldstein , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Greg Thelen , Johannes Weiner , Michal Hocko , Vladimir Davydov , Mel Gorman , Vlastimil Babka , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/3] Directed kmem charging In-Reply-To: <20180221030101.221206-1-shakeelb@google.com> Message-ID: References: <20180221030101.221206-1-shakeelb@google.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CMAE-Envelope: MS4wfAn6aueZ7lWeCrwh3VaSdzjrx10qQ8RmPIEhnO1HrHp9JsPrEVeuOK6xCDsahTxrs0b2sovcAFGCcX+XzPPjgXRx1FXB0snVCsPNcr7MCs7nyhT+L5lC k4s3tY6QQ3jgtx3y/IrYwcIUTxf4JslwJIFuF51ESN73InB3YnG/SwBOa8jUswq0S4FJG3yy+bMG6b4tEw5nsD9bWq/oTaeYODY2/B09KA/LzT1/VnEpcwjh ciJMme4okzfbBtnKFcRry9/UquxkJVps3JkJDtaTkvbLT6+elI2zzoV2ygfI2nim748OvF3P0l24kEMzNty1ZcHllFXoiY/uyIkze1AXLzQ+hkmv8hopbuVg qv2NWesHu1EFTv5esPyll5QrhBp4lQVo+oY9cMV20DsP9hEXXZj09fqX5LH9xw/7xBipuKl3O2mXgx4rbc6SewfvFu85lRjAaolhkHdd52B/n440sEh1VL/o i9qqhZcRTxTusSsieWNFeaM+roipfl6pFcIRos5NIAx2EvfdGlXo1r1Ok2Dl02RrykAPZ+NEVbocqah8HKP2xqLmlQDTQ2IH74CX456AvwLnmuCw8EhDkUop 7YGxNueDyab92fXqPhhd/J5I4DKXf95TsGaVJIZ1ix2q5qIIIFyKImQ91YKn5oA5+Bo= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Another way to solve this is to switch the user context right? Isnt it possible to avoid these patches if do the allocation in another task context instead? Are there really any other use cases beyond fsnotify? The charging of the memory works on a per page level but the allocation occur from the same page for multiple tasks that may be running on a system. So how relevant is this for other small objects? Seems that if you do a large amount of allocations for the same purpose your chance of accounting it to the right memcg increases. But this is a game of chance.