Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2067351pxb; Sun, 24 Apr 2022 03:46:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwu1DXP7N/0Zojlf24jaWIWRYDFSMCK2Th7SZt5FkgAlVUQurIRQs+6vGYWsKlR8N6csCAl X-Received: by 2002:a05:6a00:114b:b0:4f7:915:3ec3 with SMTP id b11-20020a056a00114b00b004f709153ec3mr13832443pfm.8.1650797201016; Sun, 24 Apr 2022 03:46:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650797201; cv=none; d=google.com; s=arc-20160816; b=USd6IFdhI0TS4tMPMm78ijXjVe3DYH7vZU3F1tTNg8YPEMDGuMwk1sYjRdeiT3MKdf R1At/99Pvw4hMX92SaGAvlUT3riHhaLUzoCTRuCpcxu9n0OwPuElo9WBSEU0shn7I6qd ia4FIX4Dkx286b9drE+RSByT+nDpByhgshRRDrEf4ayBj1JBd7ZXOxfJ5E8K8IZ0hH4E f2dUk4t7o7CMluzyGeH0beVisT7pKNGjPXitLH+t3LiM6If2+qOhVzbi5aCPCAPx8E0A JiAXs75bHLuGb86FPrzITDhb3zWDRkslIpKmokIWkL4Ietg6gpz2Fjswa66UQproeTYM rJKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Yx8y7goVHBTlGvdtFFuNwwMCsekJcpP9yvzgyjH/bp8=; b=EU+gQADGyIc40QG/gG069+arOPrJ6HiCo5nWBJyX5DJBVLZitspEX0YUK8U83U9mLP AB4UUFpFzXZFoGyZNYTfNXSZc9gco7OhYcUEZ6bEo3hriGj6tJZXF/+OtzvyoLFlu2oS bspqUDfxSBh2AOvXgDoRhMg8B55XCtyz0Us1G5RiL5VpAghXSnEHFtJuQev+96cyHTGw tqIMMjC3CGSSZO7I1gHgPFwGnhg9F0E6Ih4vx6H0QVGzCgDLncCco58PJ3NWPdn9Px8Y IqGX1Eib/wPslx9In2f77+ySdKPdOa+66H0nZfkgJNh1X5zFt0olrTMpmAaehul2jRLk IS8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="qUkkGk/b"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ca18-20020a056a00419200b0050ad065310csi2693175pfb.200.2022.04.24.03.46.27; Sun, 24 Apr 2022 03:46:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="qUkkGk/b"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S237238AbiDWVr4 (ORCPT + 99 others); Sat, 23 Apr 2022 17:47:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236663AbiDWVrz (ORCPT ); Sat, 23 Apr 2022 17:47:55 -0400 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2614DA6 for ; Sat, 23 Apr 2022 14:44:56 -0700 (PDT) Received: by mail-pg1-x52c.google.com with SMTP id z21so2569838pgj.1 for ; Sat, 23 Apr 2022 14:44:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Yx8y7goVHBTlGvdtFFuNwwMCsekJcpP9yvzgyjH/bp8=; b=qUkkGk/bpw8J14YdHOTb4OZuCmi63QvteZvtb9Aamaxo0h8F/x9cxEHz27DzgjZcfU lO2ufp6jXpfprhMFOAKOY0UomKf+5C5Xba3QJ9Lf4mg0l10Kw819Itq5Awrey6+53cOg vVA2sH9g5lqyk8SDJcuqUYgRvr+O2I7vjscVtPkcSJ79na68KphWwZX4Zw31RRzsMgD7 y6Ij35PmRo1cbbPNwwgB/xc3XBmk7Tqx6kzpyXUyoRCj61jI4z4UfkEhCCrywL3K5adi c6eVmKQZxrrOxtFX4Rt9FfNl5dyK0cMSNPoPJHPpsL/X1CTkqgnoWbDbiWbbx0VP5xpa NR0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Yx8y7goVHBTlGvdtFFuNwwMCsekJcpP9yvzgyjH/bp8=; b=UJh/Ub/3lsR9UrBN3BjlSqhiVVVpdJF8f5KeUfXAg1FDGZPdEpM9fMsUERjArgcWnf xcIATPEYnfC3tt8Hba1aCitPx7fLVmR9Jt0FPKD6TTsM108mghM1iEMXlpCF8y9uQOPb mZiKzHqhUAGfqJMCCW1W/UBEnlewrTZ1cio04E94ofOGjCcG5+ty6bkQq40Lq9rFXCUQ tk6V0SHR/NJe8+Lchy+0rn/ga3/dtbAKjhtBAsNw2CVK+1sQOL3Xk/hJicHV9/8mjU2d P+ei58cR1XE6a5J3m1ZRK+bAQ1HzXn44NAr+jVj3RSpCX2oMLnwRVVOS58tA1ltyHcNE WzyA== X-Gm-Message-State: AOAM530W8w+GuO4f8etUREPWDYa7aSyF5n4w0TwJNExHDn5snpCeUobD DPSYrg1Oewp0gWfOBlkiYzYEWxa0Vz55fYyb77lzGg== X-Received: by 2002:a05:6a00:1695:b0:4f7:decc:506b with SMTP id k21-20020a056a00169500b004f7decc506bmr11503134pfc.7.1650750296183; Sat, 23 Apr 2022 14:44:56 -0700 (PDT) MIME-Version: 1.0 References: <20220421234426.3494842-1-yosryahmed@google.com> <20220421234426.3494842-2-yosryahmed@google.com> <20220423133035.b6iz6vzhzlym3m4w@google.com> In-Reply-To: <20220423133035.b6iz6vzhzlym3m4w@google.com> From: Yosry Ahmed Date: Sat, 23 Apr 2022 14:44:20 -0700 Message-ID: Subject: Re: [PATCH v4 1/4] memcg: introduce per-memcg reclaim interface To: Shakeel Butt Cc: Johannes Weiner , Michal Hocko , Andrew Morton , Roman Gushchin , David Rientjes , Tejun Heo , Zefan Li , Jonathan Corbet , Shuah Khan , Yu Zhao , Dave Hansen , Wei Xu , Greg Thelen , Chen Wandun , Vaibhav Jain , =?UTF-8?Q?Michal_Koutn=C3=BD?= , Tim Chen , Dan Schatzberg , cgroups@vger.kernel.org, linux-doc@vger.kernel.org, Linux Kernel Mailing List , Linux-MM , linux-kselftest@vger.kernel.org, Michal Hocko Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 23, 2022 at 6:30 AM Shakeel Butt wrote: > > On Thu, Apr 21, 2022 at 11:44:23PM +0000, Yosry Ahmed wrote: > > From: Shakeel Butt > [...] > > > > [yosryahmed@google.com: refreshed to current master, updated commit > > message based on recent discussions and use cases] > > Signed-off-by: Shakeel Butt > > Signed-off-by: Yosry Ahmed > > You should add "Co-developed-by" tag for yourself here. > > > Acked-by: Johannes Weiner > > Acked-by: Michal Hocko > > Acked-by: Wei Xu > > Acked-by: Roman Gushchin > > --- > > > [...] > > +static ssize_t memory_reclaim(struct kernfs_open_file *of, char *buf, > > + size_t nbytes, loff_t off) > > +{ > > + struct mem_cgroup *memcg = mem_cgroup_from_css(of_css(of)); > > + unsigned int nr_retries = MAX_RECLAIM_RETRIES; > > + unsigned long nr_to_reclaim, nr_reclaimed = 0; > > + int err; > > + > > + buf = strstrip(buf); > > + err = page_counter_memparse(buf, "", &nr_to_reclaim); > > + if (err) > > + return err; > > + > > + while (nr_reclaimed < nr_to_reclaim) { > > + unsigned long reclaimed; > > + > > + if (signal_pending(current)) > > + return -EINTR; > > + > > + /* This is the final attempt, drain percpu lru caches in the > > Fix the comment format. "/*" should be on its own line. > > > + * hope of introducing more evictable pages for > > + * try_to_free_mem_cgroup_pages(). > > + */ > > No need to send a new version if Andrew can fix these in the mm tree. I will be sending v5 anyway to address your review comments on the last patch. I will fix these as well. Thanks!