Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2744541rwb; Fri, 2 Dec 2022 14:31:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf6fQhMn3Khyi5txX/i1G0a9bllvAFpSTKgZsBAReqwIsn2d0PwS4/K9bBjcrne3pe7yJDWP X-Received: by 2002:a05:6402:5483:b0:468:d5a9:cb4b with SMTP id fg3-20020a056402548300b00468d5a9cb4bmr51222429edb.409.1670020295139; Fri, 02 Dec 2022 14:31:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670020295; cv=none; d=google.com; s=arc-20160816; b=i5frgrQryLwYftiYqpXbGiAt/jerlf93YBZ4rwOiPci5FmaR5tGczuSDtxtwmdxhhc XJlRjprs9BYt8ZUJYBnNaHhgCATzIVtMELH8+TqlsMCFskR1whiFP6I3eU+emnYZVV+h RwdMDqU4CK4AuSYzNxXwDMWfRlr2edOteMQ8eVJWokMeMDCe5kwLhN89/QNFOnHTBRQM 8qD5BmhRfGOmCRSeBoMhd04EnfJifB2ZZh/0owaEjvzvGR4/H2wXA/VM/0KV4mfdSieS dk9RvlyrL5o1hejv41q1pErntl7YokHYgE44kEeRo5M2LTeN34sIIhzB5Tc0J+LFsIme TvmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=Nb8k+DXeBU/J0+0BiQ1cnwf8hXfYeMnAmujWdPmsnKU=; b=LU1dK/X8j8h9IRr6XSFCYWiAQ9oJgOZbp9lMrEhxc18Ko4qf0hs5BSNXEruv0PpNJ+ py2f9+8J2enn7rYLpOZZyDYjkHElsfEgvwOuaJpJMeMOtCMIHKaQn/eIzpJo4IKq7qer qr9OMyRfbrVi1T8Q2MWVS1ksZdGjuby7Hm/cFr1fqbz7MuQSBZTpHMlBK4pSgHHtocsj NFlYSZhBfy4J81t6ydXa24MUdsdNfJ6oacSWoECeg6dgFC1wbmJ4f6D97rFHZKs02n+x 7ojRcmFsJhBTiSETtvnjNE2kGmr5fSFwB0q1ccVrKGCKyHyi3QRxPxetaSMeXTtz8EEX mJNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=UxM8kjrT; 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=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id be25-20020a0564021a3900b0046ae9e1bacesi7033843edb.604.2022.12.02.14.31.14; Fri, 02 Dec 2022 14:31:35 -0800 (PST) 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=@linux.dev header.s=key1 header.b=UxM8kjrT; 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=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234851AbiLBWVK (ORCPT + 82 others); Fri, 2 Dec 2022 17:21:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234461AbiLBWVI (ORCPT ); Fri, 2 Dec 2022 17:21:08 -0500 Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42C55E8E26; Fri, 2 Dec 2022 14:21:06 -0800 (PST) Date: Fri, 2 Dec 2022 14:20:58 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1670019664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Nb8k+DXeBU/J0+0BiQ1cnwf8hXfYeMnAmujWdPmsnKU=; b=UxM8kjrT9Ea2zn2bW1xVTLb0ig9zVs+Un8YBzcLzK7pOIf97+C/ov/djzFl3e7QSaXWeda FP0gGaYLRkXM8B1mFBNJc0IsIcbnK3fQgl0fMEbesY65k0hd48x2jgSiiNubIX1gTlc9SL 8p/21LJMfIiYG6LzYyf1NcABb1nKOqw= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Yosry Ahmed Cc: Andrew Morton , Shakeel Butt , Johannes Weiner , Michal Hocko , Yu Zhao , Muchun Song , Tejun Heo , "Matthew Wilcox (Oracle)" , Vasily Averin , Vlastimil Babka , Chris Down , David Rientjes , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v3 2/3] selftests: cgroup: refactor proactive reclaim code to reclaim_until() Message-ID: References: <20221202031512.1365483-1-yosryahmed@google.com> <20221202031512.1365483-3-yosryahmed@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221202031512.1365483-3-yosryahmed@google.com> X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS 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 Fri, Dec 02, 2022 at 03:15:11AM +0000, Yosry Ahmed wrote: > Refactor the code that drives writing to memory.reclaim (retrying, error > handling, etc) from test_memcg_reclaim() to a helper called > reclaim_until(), which proactively reclaims from a memcg until its > usage reaches a certain value. > > While we are at it, refactor and simplify the reclaim loop. > > This will be used in a following patch in another test. > > Signed-off-by: Yosry Ahmed > Suggested-by: Roman Gushchin Reviewed-by: Roman Gushchin Thanks!