Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=115.124.30.132 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796203334; b=w40E2T124TXlADvj3s7owMz8r3j1tGnQcaDzcmkP27mw+SasqPbrpTcc+nIJNuDHhUk1 kdYilQ9P6s8qORIxnRpqps0vsIrzLApGxZkHviOnTPltM/xOASC4MOXesjUKzPHdY2puc 5KEmldl0eHGDw0sWyxtjHLwLkz34fLlVo9Gt3uEzWqabTgmeR/yV5+/zqbYZnIF87g61Z 3zxzIIGjbR/Z+5+tKRcszw4DdIvLt9unsKUCKIetkrKIJCNvzkBBlQpHf1fN//JkEc3sz XQc+YgIhOgYOfxdnzC437y/wS/JRIMJH5Sl2tG+PrK2w5c4/2ciOtqFTE5RcHEHKAtQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796203334; h=DMARC-Filter:DKIM-Signature:X-Alimail-AntiSpam:Received:Message-ID: Date:MIME-Version:User-Agent:Subject:To:Cc:References:From: In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=whscy95Z2VH3GwzIF2OYi48vPdlR383m2UYWoQ+yoK8=; b=WquBmlfim0Ty+fCfcmeGq50mfS9OSkTr4BwbTvWbTwhWkLH1vhjaFGwag582/Xgd7qq5 GfvfxhBIMdwE0QueFwsvz5uiVhNZd4NOPUBxWv3ekRM5Uxq9FxjxNY3oxtFi1cn3QqkmR ubkgLWDV5J1cMv949d+OeJ4FZ78GmQHwWPb2QMdnZ97fUFsD+GgjEzkicB3rNH3x5t7OM Rt1b//zYtUv82zkAbXqMv7iYMuP38jiOnaZAM8qaLgWgP53hCdoDoOGlL4sO3cuawGpCC E0NgmwVmQXqP9QWrHSRcTn+JC2Q3PRTo5lX0MeWgh8xdifIsYYnM5x/75OAvXMR4KAQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=F2VVOntk; arc=none smtp.remote-ip=115.124.30.132 Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2CD1B606A31A for ; Wed, 2 Dec 2026 09:22:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2CD1B606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=F2VVOntk DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1796203330; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=whscy95Z2VH3GwzIF2OYi48vPdlR383m2UYWoQ+yoK8=; b=F2VVOntkDxDtxhthS569ncorw1oEwPnGt/1DDqdIVIavoQu2lhRoRELt4ktabW//RCMqIlEZh2XeQTk4wsYAc2LzsRagNHVc2n/U6yiKNj7NpfcOTx8mziWmvTVhOsLIvstZ6eQM3LNos344qTVd3Jx5VkbseZL8iOkM3L1W6aI= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R961e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam011083073210;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=80;SR=0;TI=SMTPD_---0XG8pckW_1796203322; Received: from 30.74.144.133(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0XG8pckW_1796203322 cluster:ay36) by smtp.aliyun-inc.com; Wed, 02 Dec 2026 17:22:05 +0800 Message-ID: <7031e253-5d74-45dc-bcea-010572c9b0ee@linux.alibaba.com> Date: Wed, 2 Dec 2026 17:22:02 +0800 X-Mailing-List: linux-rt-devel@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 13/32] mm/khugepaged: stop MADV_COLLAPSE on a fatal signal To: "David Hildenbrand (Arm)" , Hugh Dickins , Andrew Morton , Mike Rapoport , Peter Xu , Michal Hocko , Kiryl Shutsemau , Manfred Spraul , Davidlohr Bueso , Cyrill Gorcunov , Zi Yan , "Liam R. Howlett" , Nico Pache , Ryan Roberts , Dev Jain , Barry Song , Lance Yang , Usama Arif , Lorenzo Stoakes , Rik van Riel , Vlastimil Babka , Harry Yoo , Jann Horn , Yang Shi , Zach O'Keefe , Song Liu , David Stevens , Kefeng Wang , Alex Williamson , Suren Baghdasaryan , Dave Jiang , Matthew Wilcox , Miaohe Lin , David Rientjes , Shakeel Butt , Jan Kara , Mel Gorman , Jason Gunthorpe , John Hubbard , Gerd Hoffmann , Vivek Kasireddy , Dave Airlie , Matthew Brost , Joshua Hahn , Byungchul Park , Gregory Price , Ying Huang , Alistair Popple , Hagen Paul Pfeifer , James Bottomley , Felix Kuehling , Alex Sierra , Balbir Singh , Kairui Song , Qi Zheng , Axel Rasmussen , Yuanchu Xie , Wei Xu , Baoquan He , Oscar Salvador , Muchun Song , Dan Williams , Rakie Kim , Hao Li , Christoph Lameter , Roman Gushchin , Sebastian Andrzej Siewior , Clark Williams , Steven Rostedt , Alexei Starovoitov , Xu Xin , Chengming Zhou , Shivank Garg Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-cxl@vger.kernel.org, linux-rt-devel@lists.linux.dev, SJ Park , Chris Mason References: <20261129-fixes_core_3-v1-0-f66094116801@kernel.org> <20261129-fixes_core_3-v1-13-f66094116801@kernel.org> From: Baolin Wang In-Reply-To: <20261129-fixes_core_3-v1-13-f66094116801@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/29/26 6:06 PM, David Hildenbrand (Arm) wrote: > A task that gets a fatal signal during MADV_COLLAPSE keeps collapsing > the rest of the range. Consequently, the exit of the task can be delayed > for a while for a large range. > > Let's fix it by checking for a fatal signal before each PMD, simply > breaking out of the loop. User space will never see the return value, > so no need to return -EINTR. > > This has low urgency, as it only delays the exit of the task. No need to > CC stable. > > Fixes: 7d8faaf15545 ("mm/madvise: introduce MADV_COLLAPSE sync hugepage collapse") > Reported-by: Chris Mason > Signed-off-by: David Hildenbrand (Arm) > --- LGTM. Reviewed-by: Baolin Wang