From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f182.google.com (mail-qk1-f182.google.com [209.85.222.182]) (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 4DD332BDC00 for ; Wed, 3 Dec 2025 08:59:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764752395; cv=none; b=t6qa3RR595W6KvPQoHcm3s8lGz+v/gH8C/hCOKlbhoV+y9LIg6xbv/t1+m8ZEt53iQ2bI/3vKuhyzk4gtpCHWuWojCAm+Vn+NKVk3XHb/EoXwn9jWAXkbhj5a3VJObK0vRVF8kNTcsiXq9vxCJ/0mpWvUYoJ3mC/jd9Cc2RjQMA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764752395; c=relaxed/simple; bh=HTye8apJP792ORGS5G2JBm6hM1UQhR6ahVcn8NRpYcQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZhVOS8fueoP2AZoG4FRxC2U+nqAfea/32Ydb3exzMRAIdNA/Jp1hkxLSU3xieJ3Uv/2k/1sFQsy9ZMQYLyloP5LyGrRK+rlDSb5rhOl1LuqywaWHGHEmbVDL36Fku88AfSE9dmBV6kOJl7gcJtfOwrCGnJHOYePjSEgvfgABkTc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net; spf=pass smtp.mailfrom=gourry.net; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b=SG/eQyBV; arc=none smtp.client-ip=209.85.222.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gourry.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b="SG/eQyBV" Received: by mail-qk1-f182.google.com with SMTP id af79cd13be357-8b2ea5a44a9so573943585a.0 for ; Wed, 03 Dec 2025 00:59:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1764752392; x=1765357192; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=XsIHq6UBLDlwXTSMYyxxp+mXyQjlAZhBo3spwGooV9M=; b=SG/eQyBVKAbZhBbu+dDqdQNN+YC6VnUw3tVER1jFgmnOtvhvlOxAT/09bofT9Br4QL PDGJqmjxmLegwffu0pt1f5cQQPxCp2gBSbUIECx7EMkINvhq/Wf/MDDJ7sUudNOc4mfG +xroiiQojXCc3W9/4GiDPD6/hdO4b/bm9Q2r6BIh+UbtIKduOY2kxY5Y8ZlvmfPfHQZP J+PGezX7V9TL2exQcFYRTtrd2qNdP9vgQ6hk1+a8KUBq+SS0yKCWAmmGYxSeHYMD4T0X JS+eMZs3lRlUml/5MjNofvjwvuxx6sUm7ZIxU4GWIqRcYQZwhlmOe437OEctUvFjQ68K y61Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764752392; x=1765357192; h=in-reply-to:content-disposition: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; bh=XsIHq6UBLDlwXTSMYyxxp+mXyQjlAZhBo3spwGooV9M=; b=TT1xcyaHwbcizcI8u5XeJTaZBK6T8v84VNCcsWqu2O7TeMR67YvBziGUvSMQa06fOn 0qc2otj/xeFB7OB8x4lmgz8o4NCzg1SMhm3laNC+k3yjh6vvGM6ftoP3t3If+BEpoIAI o5IALwtLlZ0Z3uT378IPPlNVYxJ5HLsnehh3zwst6rM1xWrB4kgkAJSjLAUdfe0g5NsW GQ84u2+6bvIURfR+qCws78G7Dquqw3UXaO86oK1txMR/IKrcc6qLhE9mpSYSHL2TkgH3 LqV0tmpywN2gyjh8bOXPDHi6dYlty+XGAl7vqsuzgBnhlqGDAMpMAB03sxiCVHR1pqTi ExiQ== X-Forwarded-Encrypted: i=1; AJvYcCX/+ssFtZZhahqMpYJtXtHcPZkOcFt0j0SwWOdVAJgL8pB6vp9jQrLR0IT2MrxP94PhmspOkkWJzmPteQY=@vger.kernel.org X-Gm-Message-State: AOJu0YwkmkxoTvOhb/mOlu1gXncC9u8n5NdyiCsi0p21DRzGA7bUJH7o Hlz81Hv/ShFhJgTWAiWni3jqDVALI+C6Tzmk2V814bc3Fwoy6srglfGmchYMBAwROzo= X-Gm-Gg: ASbGnctnQNx1EajENn+9gIJ1gP39qp56cIFebyDrwlwsfZOVt+5PjlASris/BRVdHMT hvTIEqUXAOJUWFeEoC/W8MvqD0FygvWIT0hngqD8xZjv1rtttdJ1EC81PoplouypnoT6Pbd5Y/D 3phmEvB/WKc5jVxZGICEoxo3KnI+3IE2dTcHB/1j8EgNyJeqAspApMasEAhw6C1HWBPYfzFePtK 05orgZjms63FAIfYnTKJ2DH6a5oHxr5OaRauwHdr7GGN10W/UbslqB1mSVI9hgpGDxrS32bDh4e 0mAkwNSpAbarj9ow3yu2wnmeT7gHA0GIF5G6IV3RzJ6mK6ki6s5LD128Jis37EpAxfHr+MVY5yu 152RUz5PYKrqrstR9MQSAKk68wJTsCEF9AIym1mhLg4UDWenXVwpAQ7wldZmMQyaGursyoX0NaO mco2Rffz/28Qo/yE39COi59Gt+APnr4KGp2Dg54huTpj07KbgiuSiNQwEgQwcDsB3TBZT0cQ== X-Google-Smtp-Source: AGHT+IF7OCy75trqE4XZK+MiKWwJuAM/GRIvP9U9mo+1pVR/XXb6KYqnQMGq7xdWFJztfAZ87UhXAg== X-Received: by 2002:a05:620a:1a9c:b0:8b2:e533:66f7 with SMTP id af79cd13be357-8b5e47a6f9fmr210003785a.10.1764752392105; Wed, 03 Dec 2025 00:59:52 -0800 (PST) Received: from gourry-fedora-PF4VCD3F (pool-96-255-20-138.washdc.ftas.verizon.net. [96.255.20.138]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8b5299a5d48sm1251362685a.12.2025.12.03.00.59.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Dec 2025 00:59:51 -0800 (PST) Date: Wed, 3 Dec 2025 03:59:50 -0500 From: Gregory Price To: Michal Hocko Cc: Andrew Morton , Aboorva Devarajan , vbabka@suse.cz, surenb@google.com, jackmanb@google.com, hannes@cmpxchg.org, ziy@nvidia.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Oscar Salvador , David Hildenbrand Subject: Re: [PATCH] mm/page_alloc: make percpu_pagelist_high_fraction reads lock-free Message-ID: References: <20251201060009.1420792-1-aboorvad@linux.ibm.com> <20251201094112.07eb1e588b6da2ee70c4641d@linux-foundation.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: On Wed, Dec 03, 2025 at 09:42:59AM +0100, Michal Hocko wrote: > On Wed 03-12-25 03:35:51, Gregory Price wrote: > > if (!ret) { > > /* > > * TODO: fatal migration failures should bail > > * out > > */ > > do_migrate_range(pfn, end_pfn); > > } > > > > Maybe it's time to implement the bail out? > > That would be great but can we tell transient from permanent migration > failures? Maybe long term pins could be treated as permanent failure. > I see deep in migration code `migrate_pages_batch()` we would return "Some other failure" as fatal: switch(rc) { case -ENOMEM: ... /* Note: some long-term pin handing is done here */ break; case -EAGAIN: ... break; case 0: ... list_move_tail(&folio->lru, &unmap_folios); list_add_tail(&dst->lru, &dst_folios); break; default: /* * Permanent failure (-EBUSY, etc.): * unlike -EAGAIN case, the failed folio is * removed from migration folio list and not * retried in the next outer loop. */ nr_failed++; stats->nr_thp_failed += is_thp; stats->nr_failed_pages += nr_pages; break; } So at a minimum we could at least check for !(ENOMEM,EAGAIN) I suppose? It's unclear to me based on this code here how longerm pinning would return. Maybe David knows. ~Gregory