From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF145C47088 for ; Fri, 2 Dec 2022 22:21:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234856AbiLBWVK (ORCPT ); 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 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!