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 8BBF1399024 for ; Wed, 18 Mar 2026 11:02:56 +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=1773831776; cv=none; b=L8vBfb8JRsAv1DdQg72lB2YhJIY70KOXbb7j6E8tHNqMHceYrGGnt6KeHJRFss4FPROtAsw4yqt23iAdG2qex6NBauiZ59cn6UEiqGvhf+dJkkweqiSAYGfk7wiPmCB8yP96kvXXbpFPIxt/3T/9nTkisW8OSxXV48Ye6yqy3tA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773831776; c=relaxed/simple; bh=zfsdZBqryydH27u6JZMfb3afJOf35YTfOia93PQ1C00=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gAmLDkAfqb50kvDIoPwx0r7n0Un8q+9u/tXseA8lGKc8b/h9pCG71BWlbAup1A4PTaUa3afJeoAnhGmkbsrdCEw5xVuF6Vj+d3HONS+bfCuacosTrMSdU6fMk4nCGGz1JVp4dolYEuwREgWd0CKyCmPJC/+t+XJ6xifSJ8yPHOo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=r+3MoTCF; 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="r+3MoTCF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A6ABBC19421; Wed, 18 Mar 2026 11:02:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1773831776; bh=zfsdZBqryydH27u6JZMfb3afJOf35YTfOia93PQ1C00=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=r+3MoTCFbOoSCaDnsO98mty6x/IRu1jwhpGqiG9UdhI2m9A4L+uLhSAyE8ok1p0Ai CO9lM8wb7ZgHkq4g3ptKIChmnYSYqVIhmg8gKwDFU0PrqHJgFki/7/SmmLwcdTFf98 wKffjIZN34gzR3Nep6U+Va9Ipn9NsKn3+Wuump9CHVsQZ5bgo6n9SdcmTAj44pTc/y YDEGzmLqWRm92GzrlnLvCttlhG3bpFVJwFP72Ssvpo/99OatfSjmPSlDtusovF3NdX nQ0WhL22ieafm7WwepuzVuyKxNjn9eOkayIYmeA1LJ8wiUDvRp6nHUYoSDLr63/XYp F1GelnWWCD1Wg== Date: Wed, 18 Mar 2026 13:02:49 +0200 From: Mike Rapoport To: =?utf-8?B?TWljaGHFgiBDxYJhcGnFhHNraQ==?= Cc: Evangelos Petrongonas , Pasha Tatashin , Pratyush Yadav , Alexander Graf , Samiullah Khawaja , kexec@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton Subject: Re: [PATCH v7 2/3] kho: fix deferred init of kho scratch Message-ID: References: <20260317141534.815634-1-mclapinski@google.com> <20260317141534.815634-3-mclapinski@google.com> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Wed, Mar 18, 2026 at 11:33:09AM +0100, Michał Cłapiński wrote: > On Wed, Mar 18, 2026 at 10:33 AM Mike Rapoport wrote: > > > @@ -1500,8 +1502,8 @@ static void __init kho_release_scratch(void) > > > void __init kho_memory_init(void) > > > { > > > if (kho_in.scratch_phys) { > > > - kho_scratch = phys_to_virt(kho_in.scratch_phys); > > > kho_release_scratch(); > > > + kho_scratch = phys_to_virt(kho_in.scratch_phys); > > > > Why this change is needed? > > It's not necessary but kho_release_scratch() will call > kho_scratch_overlap(). If kho_scratch is NULL, kho_scratch_overlap() > will return early, making it slightly faster. Alternatively, I skip > invoking kho_scratch_overlap() if migratetype is already MIGRATE_CMA. > (resending this since the last email was html) Thanks for the explanation. Let's keep the change and add a sentence about it to the changelog. -- Sincerely yours, Mike.