From mboxrd@z Thu Jan 1 00:00:00 1970 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=1796203337; b=Jwx006019F+gp5edk4dIMfHJQ90RO6iQPWx3gJfzSeBulDpY7S1dkLlbpxMLp+sJmeIL AShiqg2DXt2uAfjB9z2Xlj35phFdhg8cYX+w032OpO3+keEb4fDTzO/lFlx705p2ELRtd Usw1chn5P2sMhEVLut7ZjakHVezOUKMfqA24s2B7gqT0uZrDtBCJicNUG5W8haWyNnTPW 3rTfF95ASuXGiNv4wA5VHk4y7Mhy9NC5SRbcQE6ANiSBnQQJI9nCHg3tKkV2YR+DlAySs 1bwvUZccmqyd4F9CQGxu2XdlPD/yr85IaZrYeSMyylSrgVai89sprFVDMtbQfq3y/vQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796203337; 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=FR+EyzZdwyCZa39TyPiF5LOVxE8yyX0Tl0cRpPYCLhAbYtKYRzVNqr1eULeZs8w1kASS 9x5sV5SnPccvCj1T/NHm1ex5+2ug0TCXP72h+RvCbiEToF5F2eEJ55HDsIkguJZMggkYz yqBKObqsFxb5foEk66jTBHWXIwFyH65vpaN48bhTDwgKS2JVcld+b73I3z9sN0tVT0vux PIqmxKwG/strZmFAe6eAjd2SSd1hgR6x2rzMH026KHXP9QShRCsY3iTp2OUN3RcHpUjHq ghzEKsDdeNx4dJl5Y1Fgdhwy0vUtqzJD3DzEhllChXCieWVmwN8EmJY8yZPKx9mHQPA== 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=F2p74ST3; 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 82CED606A31A; Wed, 2 Dec 2026 09:22:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 82CED606A31A 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=F2p74ST3 DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1796203331; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=whscy95Z2VH3GwzIF2OYi48vPdlR383m2UYWoQ+yoK8=; b=F2p74ST3vqk2tU6qJ6EUXsuruleNZY0UKtAry2uaqbwRsB90DjfCT9HlYPDLoxKiQglhQLFH764xWDmSWb4Lz1nGAvCV0ujHzSsWJoY+XKSirHBVnfyEFQMBB20mrSOBOhPnrH4szoG91zl2V8zzpJabB4Shs6ajI7/mWKlLzig= 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-kernel@vger.kernel.org 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