Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp5486345imm; Tue, 26 Jun 2018 12:05:42 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLOOwS+37UqIeLA12o/AaYoOEQVTLuJhwrKcxubzF2d8Pq1TQcPCELYLmtZBTfRTb6kK4WG X-Received: by 2002:a63:af14:: with SMTP id w20-v6mr2502183pge.47.1530039942851; Tue, 26 Jun 2018 12:05:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530039942; cv=none; d=google.com; s=arc-20160816; b=WdmqUMXCihBrZf4r6YMkMe0K2p0agDzYzwqh4AAQB/3q6iGGzVPgT4ZVryOAGw9+VK 4XngnKMOoW1NKZOQpigyPiST0/vRGNM8UG76CSFoMJBfYRaw68lF/Hfv5+WZQnoYUlfc uA5kRo3Lk1/3xTngQT14+aFAVyrJX3WwrIB0/AqEKfPHg3l8jUH0NR0Fh+z2kTwFxo3m tw43IiAv0HCnEPlbrrBPef8tlL5dky3aVkaqJJ/yemkPehBzBym6I8K1+sG70ukc2hUo x4+xbUTmy5H2M/T3WMzXzLvwkHjfeG1bp8nDKGdXb6KPabqyHDI1yPjS+CVhsUhlXgh4 vc1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=heX1f2CgGl3o496OINg/xkciw0CIxICRoeLjeNzNB8I=; b=jrYKzn7BGae0ltV0F7wm3IkPcueArUkVECik7/yj0Ue4ghlLmP8EhVL9Msk2pN9Ygq Cb7pplbArPYJbGavI9m38dpdMOxMEd8TSG7oi5MHI8ZsNPb+spwO0RtYpwCt0OfD0VRq 7Lgrlnv8s9dBWHn4w41OJQusbH5BeSDPChJBy2YJlNeMVIGCZfZrBjzcKYgHWznkp/H4 6bV2S3PicnDev+bp3qK/fernLGkOW1Vp7ePGDHnvdErQfF6uSp2k8YI++pODC3EfKJe3 nXjUrDWLk6CmRukOs0vhyVZoYdK3+Z60iyfYUPzK2rWLSza3niTVmRuIcehC/ZTxpmVA TqZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=blCmN+rB; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y4-v6si1834353pgy.251.2018.06.26.12.05.28; Tue, 26 Jun 2018 12:05:42 -0700 (PDT) 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; dkim=pass header.i=@google.com header.s=20161025 header.b=blCmN+rB; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754909AbeFZSBN (ORCPT + 99 others); Tue, 26 Jun 2018 14:01:13 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:43329 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752053AbeFZSBH (ORCPT ); Tue, 26 Jun 2018 14:01:07 -0400 Received: by mail-wr0-f196.google.com with SMTP id c5-v6so6987121wrs.10 for ; Tue, 26 Jun 2018 11:01:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=heX1f2CgGl3o496OINg/xkciw0CIxICRoeLjeNzNB8I=; b=blCmN+rB92ggkg97DX3WhoaU2AbUmshLBzwVLHRQPN/+/M8ilEObphnd1xr8/J+zsV AW8Rj8yOHxWnEljCjolT+El7uduYY88Bq/h3d9VPTmWkOFAjoNRLpYOhC+crvQOSq3RE zjr7sCZ1q7GwgVNlyasCg13F+XbWQC164E3byLPkx3e225YSUEyvyBtCaKwH94mf3RsC KGHvnm+EZD7rAIw25s4FMR6mNVRo9ZCZx9BnMndbPSoLmURDogisyU5aCIhf1YnqNnul 84JWydFmIQQQYg+sq28n8zfcQeDlFu8U9for7PNm3+cB3LitFoPjxhyqtpDrKm6MRnUI c/VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=heX1f2CgGl3o496OINg/xkciw0CIxICRoeLjeNzNB8I=; b=XQmOSrya6im1qE2K/TDt9I7QACpPUgPbMDSJrhcJ09Pu1hzW8F1V3FTbFHPevSnufE sALzt9idDmi6y3o3LwhWXS40hB6yjVZSkAbJuCRVtA70E36WLLlKJJ88paDrGQFo4SYp FyR8xc+jFfUa5difd7XjagkslfznC3/LYp373wxvpRl/PsLpuh1AlW8QZ786kz3WB4/7 Y/1kOkZb9yTC+KAgK8L0YMKVDAJFJZQyvJ9h2QUI6cLT1PqvN0YveWgZHLqHD/ob94GD xhB/CScUHFxlHl+YyXgQ2GOvlyjqOoH5GsdSr+ZvZ0GWTM5OnkEfFyZ35DxYj5c+PmLj WDPw== X-Gm-Message-State: APt69E3huHBs4BMs7T2s4/HUCXl8E6U88yS5bzmmqdbnKnEuUwf/HLV0 2oXkpr9BnxqIDKA5MLvdZM2gA1Vu9q4ejbRguaaZwA== X-Received: by 2002:adf:e48e:: with SMTP id i14-v6mr2553914wrm.8.1530036065492; Tue, 26 Jun 2018 11:01:05 -0700 (PDT) MIME-Version: 1.0 References: <20180625230659.139822-1-shakeelb@google.com> <20180625230659.139822-2-shakeelb@google.com> In-Reply-To: From: Shakeel Butt Date: Tue, 26 Jun 2018 11:00:53 -0700 Message-ID: Subject: Re: [PATCH 1/2] fs: fsnotify: account fsnotify metadata to kmemcg To: Amir Goldstein Cc: Andrew Morton , Michal Hocko , Johannes Weiner , Vladimir Davydov , Jan Kara , Greg Thelen , Roman Gushchin , Alexander Viro , LKML , Cgroups , linux-fsdevel , Linux MM , Jan Kara Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 25, 2018 at 10:49 PM Amir Goldstein wrote: > ... > > The verb 'unuse' takes an argument memcg and 'uses' it - too weird. > You can use 'override'/'revert' verbs like override_creds or just call > memalloc_use_memcg(old_memcg) since there is no reference taken > anyway in use_memcg and no reference released in unuse_memcg. > > Otherwise looks good to me. > Thanks for your feedback. Just using memalloc_use_memcg(old_memcg) and ignoring the return seems more simple. I will wait for feedback from other before changing anything. thanks, Shakeel