From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 3DFF6318EF4 for ; Thu, 16 Apr 2026 17:20:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776360031; cv=none; b=DKryeWRCCGXMDx5Mcyip0DKlWcw9StiewB4wSXJRAJ0Q7SLv5VV77ax+wQrZHJ38eXucOkx/QiEHyDTMHfzEcqBkQuq8zDqhGr80XwYFb1rAspNYUkC2ERvbWcV34FmzAy973/RdgMPQohvMID9PjvoOunqX2muQcCcChORJhSE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776360031; c=relaxed/simple; bh=OCe7lQtFBAOv6teYJrmVIk6YfRVI3M+lrX8dmNsXNaQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hcxa3dZVpNRzh2ITeqQlX0acsoAaMQOB0qIgUEAh+3+SfGA9hcphKdI6osBkWCmH63NHUxNj6SMHdkcQndxULXFysSX8l5dwQ8H65KvWw+fXjjsco2dRyfF+9T4lAbC+dEPS+aYdQJpIRMA20odT1tzagHgQrabou6XOa4daXAM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=M3ecFB82; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="M3ecFB82" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 806B7C2BCAF; Thu, 16 Apr 2026 17:20:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776360030; bh=OCe7lQtFBAOv6teYJrmVIk6YfRVI3M+lrX8dmNsXNaQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M3ecFB82gH2AD5sMovebRC3/MsJtyGt5ffGOEzSVt0ApVCTqDJHHxoWWexdFXUxcZ MlcLb8i9c0jJtxIX4XSssFspPvdO2YQer4T/HHxU53xQGQTGYmf5MMOcQF+nwU2ax2 7VPr+k9B0NcrcPTj5dkhLf3MPw0Bg2lbSbtwTf22LrOipWXU6yKCDdP/TGkdO6Mdf2 AOqD1s2/QRzALtpxZx1sJh3KYHlenSO29NWleZ0I0ZVb8MD4otN1AOORvXT3kI55jC gaby8PGuyOg4LMOqUCMsQosx9E3K93gvMw9J2JiaUqZysC1kGOu2XsFoIydtYz28XE fMCw1ezVdYcwg== Date: Thu, 16 Apr 2026 20:20:20 +0300 From: Mike Rapoport To: Muchun Song Cc: Muchun Song , Andrew Morton , David Hildenbrand , Oscar Salvador , Michael Ellerman , Madhavan Srinivasan , Lorenzo Stoakes , "Liam R . Howlett" , Vlastimil Babka , Suren Baghdasaryan , Michal Hocko , Nicholas Piggin , Christophe Leroy , aneesh.kumar@linux.ibm.com, joao.m.martins@oracle.com, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 6/6] mm/mm_init: Fix pageblock migratetype for ZONE_DEVICE compound pages Message-ID: References: <20260415111412.1003526-1-songmuchun@bytedance.com> <20260415111412.1003526-7-songmuchun@bytedance.com> <86523791-2C69-4A43-BD32-3713840A6640@linux.dev> 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: <86523791-2C69-4A43-BD32-3713840A6640@linux.dev> On Thu, Apr 16, 2026 at 10:06:03AM +0800, Muchun Song wrote: > > > On Apr 16, 2026, at 01:03, Mike Rapoport wrote: > > > > Hi Muchun, > > > > On Wed, Apr 15, 2026 at 07:14:12PM +0800, Muchun Song wrote: > >> /* > >> * ZONE_DEVICE pages other than MEMORY_TYPE_GENERIC are released > >> * directly to the driver page allocator which will set the page count > >> @@ -1122,6 +1120,8 @@ void __ref memmap_init_zone_device(struct zone *zone, > >> > >> __init_zone_device_page(page, pfn, zone_idx, nid, pgmap); > >> > >> + cond_resched(); > >> + > > > > I don't think we want cond_resched() for every page here too, even it's a > > compound page :) > > I'll update it to every PAGES_PER_SECTION, does this make sense for you? Sounds fine. > Thanks, > Muchun -- Sincerely yours, Mike.