From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E366643B4BE for ; Mon, 10 Aug 2026 20:02:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786392139; cv=none; b=LSWUWGyKvNOIIu9plKjDHF673VG0RYruZ8/33iMfXdrQyihEHRM14MKmoz3PSuVUfUF0OKo6wToPd2JvDmCVAi/zI7CWuSiIHudE9HEcnSrCXSBq1zD9UQEbzQ+6xcddrgay1bVja7Utybz/sFViIGTXqMjvbMOgEuVuLRjTXEg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786392139; c=relaxed/simple; bh=I5CVrHKHtn+Ok4r9FI96wZD4tNmwRFrnOH1dgO7/mAk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Z/Wt7+UMuY50Ab+fY7KE4Nt6ncCm8CIEuXWkCE9lQZGQGBhLPA4GTM7lGdvY/LWX73je4PYQCGfmCo7KOuegwtxAyId+qjy0mlbr/opcJQKuoZ5UfcPrd1fT/5e3VXhtsFU4/zrARcuIbUso6rFmYSEq+YcHXOxbvRTA4cmJqpg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org; spf=pass smtp.mailfrom=cmpxchg.org; dkim=pass (2048-bit key) header.d=cmpxchg.org header.i=@cmpxchg.org header.b=YA68/DA9; arc=none smtp.client-ip=209.85.222.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmpxchg.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cmpxchg.org header.i=@cmpxchg.org header.b="YA68/DA9" Received: by mail-qk1-f170.google.com with SMTP id af79cd13be357-92e53581361so104366685a.1 for ; Mon, 10 Aug 2026 13:02:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg.org; s=google; t=1786392134; x=1786996934; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=Yh4/X5pvcL1g5XfmsNkooR/puMOXNnCQI2y0I6XlIQg=; b=YA68/DA9XVFvrlM1CIPl7Q7fqoHRAsUtDqCE/Zc0Dxx3I0hxuEcxeFWvPOLgn3TjZD vjncpGnMzZWezVxHG/YDBflgiInp1F7wLt10M4mNs8fQDR7vjDHSGU5Y/nU9YD+LhgF8 Bzg8FhcDMkebzv/FGof3qZGuuJA1x4Z4kzdaVqwAkJsnz7JwpwBLJ8O1/3JX8l14HEH7 ypKbXgGTLbP+WryifdrpIH8LSO6PBwYujxKGDabE8g8tReDGuT/2ExZAHUUzOfhkCSLb Yx5h+LlcmBatWgoFVbPrecEOdZOCZgpOAt+BdCn8w00qOD4CQjggwXr1U8p9+034BoWq Qgew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786392134; x=1786996934; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Yh4/X5pvcL1g5XfmsNkooR/puMOXNnCQI2y0I6XlIQg=; b=m9Qxv0vY82cKQVE8rspSv/p3DEPzR3BqH7f1N3E9Jw0o7gLbKMhRzKcKbOfL4rvyIz JQslBmGU3+fwybaZElPbSqCiig198z9zqKZf1GhXJruoJ2YC0pcxjhmf0DG52oLY5Ukd Ydv+qxapj3VDXMObPX5Pru+CWfRniDHHkWzYqvaVyelxY84p9JmSeTAqP1r6uBHzXdli ONyL9aPJSghJIhpV1nfPaAGrJEv3isbibnwGEr6XuRPDIRl3NWNOh0ujGwc6UcOil1YO CGPAl6Q5ncqN8DuXzVqi33YQRV7osAMstZGmnikXRsVBs+id4C3FontaaGbDtxoByUId imAQ== X-Forwarded-Encrypted: i=1; AHgh+RqnwGdjeIEWa67kQbxToHthuOUylcuzMc6N0bmHWwTLoBRVqMVOW3js3q3JmB45kWes6gViXLaxirdqiNk=@vger.kernel.org X-Gm-Message-State: AOJu0YzIZewEmecszQsq3y3OLZNRfaCBW2L4jIYfO8+ltUsCrFq8x2bN HtEfSz+dMz+/KXCvDcyT31Wqmc23wGak86wD/Aa7LYDSlqIJhx2AFXtV/QCkxOn3BnU= X-Gm-Gg: AR+sD125rXxqK5FDxRuNiugKh1Z9wUNluV5CNTN2hngSQdmj/E6EqYZL9pVeWxeldtm T9PTp1ND+/ozwAVt00MaQhpY/g4Qi5Sr+/h/gS6uSe7Oc6O3p3WJYJG11uTXygAnhsrysi22+lM hzLOKKa+fQ/Gkqcd93P48gEFxCKOZ7wuSzVlI4kNlPvZQKWVF05XLieipA6jp3OV/jtq/6585/0 igcfIcSFxG17x659AVce41F++lgzedfLYURDaEGaoimPlim02mleXFfmoMw7iZiVew2foKvw3qq Cyl4kwkcmBPLV3VZDaZx61tBB+kRKucRv4TCffVov+Ed9jwm0DuoFDMyX1hzg62FopTwRu+U3J/ 9Z8Ywgfr+0f6CxqzXbxrzwC36SW/IThAaYwhN1o8QMyqd9Af94aCwPCrzzyaeC7Ul39t0EpYOU/ cdKpD/S3HyZXK+HC8KuR8LFakd7ajmP1i+VE741GpfCTz25kbj5R4FB0BgLSM= X-Received: by 2002:a05:620a:450c:b0:932:fd59:3e57 with SMTP id af79cd13be357-9369d240172mr474598485a.41.1786392134192; Mon, 10 Aug 2026 13:02:14 -0700 (PDT) Received: from localhost ([2603:7001:f100:500:365a:60ff:fe62:ff29]) by smtp.gmail.com with ESMTPSA id af79cd13be357-9366e229787sm861811585a.22.2026.08.10.13.02.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2026 13:02:13 -0700 (PDT) Date: Mon, 10 Aug 2026 16:02:09 -0400 From: Johannes Weiner To: Breno Leitao Cc: Andrew Morton , David Hildenbrand , Michal Hocko , Qi Zheng , Shakeel Butt , Lorenzo Stoakes , Kairui Song , Barry Song , Axel Rasmussen , Yuanchu Xie , Wei Xu , paulmck@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, stable@vger.kernel.org Subject: Re: [PATCH] mm/vmscan: report RCU-tasks quiescent states in shrink_lruvec() Message-ID: References: <20260810-rcu_task_shrink_lruvec-v1-1-4d9f7d5251cb@debian.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260810-rcu_task_shrink_lruvec-v1-1-4d9f7d5251cb@debian.org> On Mon, Aug 10, 2026 at 02:57:36AM -0700, Breno Leitao wrote: > I am seeing some rcu_tasks stalls in the Meta fleet during reclaim. > > INFO: rcu_tasks detected stalls on tasks: > 0000000088620d09: .. nvcsw: 6735/6735 holdout: 1 idle_cpu: -1/8 > task:GlobalCPUThread state:R running task pid:2552016 tgid:2524552 > Call Trace: > shrink_lruvec > mem_cgroup_iter > shrink_node > do_try_to_free_pages > try_to_free_pages > __alloc_frozen_pages_noprof > alloc_pages_noprof > pte_alloc_one > __pte_alloc > handle_mm_fault > > Nothing promises direct reclaim returns in bounded time, and the scan > loop in shrink_lruvec() only calls cond_resched(), which is a no-op on > PREEMPTION kernels. Involuntary preemption is not a Tasks-RCU > quiescent state, so the reclaiming task never reports one and becomes a > holdout. > > Upgrade it to cond_resched_tasks_rcu_qs(), which reports a quiescent > state even when cond_resched() does nothing. > > PS: This has been discussed in [1] > > Link: https://lore.kernel.org/all/amdWVTs0WKOxguxP@gmail.com/ [1] > Cc: stable@vger.kernel.org > Signed-off-by: Breno Leitao Acked-by: Johannes Weiner