Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp739550lqb; Wed, 29 May 2024 09:08:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWXrMuL/dOtDVjdzWg80DEKOEzs7liLLo22j/SXsHGf7LisqGPr4KbCCFSksvjr9M81eGDZ9mad6QFHePGpAEhplaXv5Bw6nPksqKm38g== X-Google-Smtp-Source: AGHT+IENZjOyXxfcuTMpHT3L1NoTR89T8DB2nsIfdOAd/+EFPCODYPJH1UZkw8j7AV+WUQHu2JL1 X-Received: by 2002:a17:902:f2d3:b0:1f2:fe82:21e9 with SMTP id d9443c01a7336-1f4494f1e05mr120210405ad.46.1716998934784; Wed, 29 May 2024 09:08:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716998934; cv=pass; d=google.com; s=arc-20160816; b=xigGiKrCk3gxUI+rhJ1HuLJ81HIxcytRlL5GkVsGLpSicZp+YJeNBc/xZckHvDt7Tq kSfalgmKU46sYik4SRt1b8MJog38QGq/a6NqgGtf9jZy/huzOzsEvQPngsXh0HmspgfY K/KkH7qMSJucyoxzW/UwE3jo/3LDzoglIyJSL/gJVfBTj+mIOCtqbxwdw+l6Y8Dp2vVf pLsz6LYCXetTc/mKi8R808AnGvonpTJxyYkJJ/X6ET0t89g8nNBYZdabriZhCdYfoHIx Lm1CqQHBKs+62dk3wmdhe9FFH84MYXThqTbggRyRYIlFtxMMsIECNJgjJK9JAufoeQRx c+EQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=iT76y12aHL4ImtbcXTa98+kFBHSfVFYyCaRgIBXgWd8=; fh=HjKBWjNAoEKEMxf6qnsdolEAiWWvK8Ej++oTK36SVUM=; b=RObjqY1fiKLIzZpoJPwFfC7J5p1eeItufez9AlPcATgbikoSVak0S9Nnep1mt3jwgN 1LnJmwhZ6JNG2Za6wkxulpDquLcYwr7o1wK7OVU2sEw9s82aCEZD4DZwMyq/zKHQ07ZZ uodZLQ9gnHcV5mcyNsO+PPPV/SEiCAMvyMEqDkQmd3m8fAo7oQ7E8NZ6AIjnI3Dmf3wb 7gPMeSespHWHCOSeZWl8Rvt5LtW2KQt3D6TSfxI1bYcc2I4wy5j1M6he+l9Wybtsn7SB uWe3RZ4e8QqAmHnZsqjh05x1edzS9Fw5BwLmnWVHRPp36zem1RpfjgnlZNQW012LpmTu J50w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=vUDJgssi; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-194384-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194384-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-697cc79b031si6888741a12.678.2024.05.29.09.08.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 09:08:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194384-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=vUDJgssi; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-194384-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194384-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 82475B2680E for ; Wed, 29 May 2024 15:49:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E6AB4181B9D; Wed, 29 May 2024 15:49:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="vUDJgssi" Received: from out-173.mta1.migadu.com (out-173.mta1.migadu.com [95.215.58.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 88193181D10 for ; Wed, 29 May 2024 15:49:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716997778; cv=none; b=X94iZkgXG7yhJPC2ZzAZN2a3UW+A56HOI9fSEYvm8FDvSm7XfAFnII4HJg2zbKkT4Dq355b67i3oj7tJfIrjMnGiFkDNuU/aQuq/LvEQA4bFKQHVlEzZpCbQlnDgzAUrtnQTInOlPJCJxTDn4jHWha/wylcdAPeAPfpEAuMA98Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716997778; c=relaxed/simple; bh=nCxOvU30J+3cwE9+wgCZqqift3Fn4rGZbaIndjfgVV4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=P9ygv29EBq8YtmVgn90GNcoYVlzZmgFHDl9t5YmSdj2oAOEGimy0XeXqWqnlh9Fe98s1VLHBl4/aDdyC+ojDJy8ehO7A9JbrpFoUXYWcRWkQfZU45WlIcpBv78miT5G1aqKBtFM5lwY4UJi89g6v9bsL4izStfrvAlBKHKEFwzg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=vUDJgssi; arc=none smtp.client-ip=95.215.58.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: akpm@linux-foundation.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1716997770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=iT76y12aHL4ImtbcXTa98+kFBHSfVFYyCaRgIBXgWd8=; b=vUDJgssiVKzM3a+MnBGnLQwbXjVcO7oKlRNifePZPj2q6omSHZw1mErz5A9VJc19ewx1rl 51MNKrjdb8eAhb19hXOPGjChWLjJ4iV5cQ9qT1Mr9UiuVXYMp3BY9D1TbI1zdrQgcaBxwd x2hfIAyah1AKSghtNZLjn+43mbq5d4Y= X-Envelope-To: hannes@cmpxchg.org X-Envelope-To: riel@surriel.com X-Envelope-To: roman.gushchin@linux.dev X-Envelope-To: mhocko@kernel.org X-Envelope-To: kernel-team@fb.com X-Envelope-To: linux-mm@kvack.org X-Envelope-To: linux-kernel@vger.kernel.org X-Envelope-To: syzbot+17416257cb95200cba44@syzkaller.appspotmail.com X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: Andrew Morton , Johannes Weiner Cc: Rik van Riel , Roman Gushchin , Michal Hocko , Facebook Kernel Team , linux-mm@kvack.org, linux-kernel@vger.kernel.org, syzbot+17416257cb95200cba44@syzkaller.appspotmail.com Subject: [PATCH] mm: vmscan: reset sc->priority on retry Date: Wed, 29 May 2024 08:49:11 -0700 Message-ID: <20240529154911.3008025-1-shakeel.butt@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT The commit 6be5e186fd65 ("mm: vmscan: restore incremental cgroup iteration") added a retry reclaim heuristic to iterate all the cgroups before returning an unsuccessful reclaim but missed to reset the sc->priority. Let's fix it. Reported-and-tested-by: syzbot+17416257cb95200cba44@syzkaller.appspotmail.com Fixes: 6be5e186fd65 ("mm: vmscan: restore incremental cgroup iteration") Signed-off-by: Shakeel Butt --- mm/vmscan.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/vmscan.c b/mm/vmscan.c index b9170f767353..731b009a142b 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -6317,6 +6317,7 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist, * meaningful forward progress. Avoid false OOMs in this case. */ if (!sc->memcg_full_walk) { + sc->priority = initial_priority; sc->memcg_full_walk = 1; goto retry; } -- 2.43.0