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 222402F6912 for ; Mon, 1 Dec 2025 13:23:12 +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=1764595394; cv=none; b=fAAqbddlOmpnZvHWlDZKkSMnClV3HauXILkf9j3S8BWE5UBzHs5qNZFgn1LEScx7J8mZPXdAa4HUONiepKnQc0scd6EI2PnithLBiVdDhaeaJdunamben/w/RJcFvpU/5vLnH1QZ6O+7njS0Yo169OQ4FHfOt4HBOy0NZVacpPM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764595394; c=relaxed/simple; bh=/5hgmbNcBuxVVJJcYDy7YeTK1UEsFT0pKtlTdyuekFg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=qtN7TdUOt8oxZCvMegs8CCkJFyzyrk1HSGY45FqoVfQcXIkiMgrrmyob8ba4WqMSCvTHG0993EqN9KdxcoAmy+ubPo2ASX4sAu7xywLUJyvTPW0kJlfLlOXyLIIZYhqQtzqY7xxmUmlL86UxXrWXvDIOPpSEQE7sDIgytTzaHxU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cqxUaKnE; 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="cqxUaKnE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37675C4CEF1; Mon, 1 Dec 2025 13:23:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764595392; bh=/5hgmbNcBuxVVJJcYDy7YeTK1UEsFT0pKtlTdyuekFg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=cqxUaKnE+6gErEu/ml7xQrLCDayT1lGoVeW+FyRqEBgt4BU85HzSBSkUzkCD/+jEF ho5xpl3kOJ958YyyK/XrrbdbajYrOBAqLuR7wft337hLePDckCAlatmd6MOQ4r9Am/ XJ7sxb1WcR5HGlxtU7X9u0xuB7gmYo1Ivb+qmndiJgIJws3GobRae5/vxPXLRS0faf MWVSL0+2tP06OZYoPc9xN2Jk5Ubw5jfd0ACuqDgSxcMyM1BZAOsYziU8FSTr/liGU4 wtdMN+XanBsT4Fg/MwzvHjsE+46k2nOOa4hrgRxW8dcNxi6Iqw1+E0C4odvn6t+ofA aq3YfXg/D7NbQ== From: Pratyush Yadav To: Mike Rapoport Cc: Pratyush Yadav , Andrew Morton , Alexander Graf , Pasha Tatashin , kexec@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] kho: fix restoring of contiguous ranges of order-0 pages In-Reply-To: (Mike Rapoport's message of "Mon, 1 Dec 2025 08:54:37 +0200") References: <20251125110917.843744-1-rppt@kernel.org> <20251125110917.843744-3-rppt@kernel.org> Date: Mon, 01 Dec 2025 14:23:07 +0100 Message-ID: <86ms42mj44.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Mon, Dec 01 2025, Mike Rapoport wrote: > Hi Pratyush, > > On Tue, Nov 25, 2025 at 02:45:59PM +0100, Pratyush Yadav wrote: >> On Tue, Nov 25 2025, Mike Rapoport wrote: > > ... > >> > @@ -243,11 +243,16 @@ static struct page *kho_restore_page(phys_addr_t phys) >> > /* Head page gets refcount of 1. */ >> > set_page_count(page, 1); >> > >> > - /* For higher order folios, tail pages get a page count of zero. */ >> > + /* >> > + * For higher order folios, tail pages get a page count of zero. >> > + * For physically contiguous order-0 pages every pages gets a page >> > + * count of 1 >> > + */ >> > + ref_cnt = is_folio ? 0 : 1; >> > for (unsigned int i = 1; i < nr_pages; i++) >> > - set_page_count(page + i, 0); >> > + set_page_count(page + i, ref_cnt); >> > >> > - if (info.order > 0) >> > + if (is_folio && info.order) >> >> This is getting a bit difficult to parse. Let's separate out folio and >> page initialization to separate helpers: > > Sorry, I've missed this earlier and now the patches are in akpm's -stable > branch. > Let's postpone these changes for the next cycle, maybe along with support > for deferred initialization of struct page. Sure, no problem. [...] -- Regards, Pratyush Yadav