From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-178.mta0.migadu.com (out-178.mta0.migadu.com [91.218.175.178]) (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 54155413240 for ; Wed, 13 May 2026 15:38:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778686711; cv=none; b=XxqKMa8aFGN+658jFBY2ZENhsEAmUU2f/dBJnAI/Skhgkn93JRP9qD6ux8iljPWe2jyj6c0pwuUaiuHrPEBSSyE1LYCaqsMUfThfs8XOS9ntLqES17I/1xG/nVjNSFfTELGBJBjL95FLeFYIE64RIi1CPk9dDHgudI1UmUCST9Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778686711; c=relaxed/simple; bh=ncYDtEhpV/YpctBHQJF2RzDIbA4WCAVMs2Kbkhj44jo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JMUSrdkYRvvvsLiiT0kp62tL5U0mmf0H+bZ20sy8z6cRYQtvBzp1MSon/MxGgIuVZDCbgpTkUgX2pmvngTTfnAore7zjpzIw8gn57E6fUR8orLET5dpWRdUsRaqsNQATq5IqjwQdbL/R4nVYiBWbyIe7tWJ7tb0BSfPKtlq9CwM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=TsJ8V0Uy; arc=none smtp.client-ip=91.218.175.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="TsJ8V0Uy" Date: Wed, 13 May 2026 23:38:22 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1778686708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=u1tKKt5poEhguNzfDiWMmHOdV70UQ2yko+bYTCbZhQw=; b=TsJ8V0UyES09OmzFS7YpqitKnC2ttNmKnMcWLjVTJbyr/87pK9caGcDItikQVApd2O4Z78 cChTcK+ARjXvWuRZs/Xk/FcWVnRF8VbhWRpDXg7j6nSr2C1sIEwVWCyu2S5qonCgLVXRvb 5ALVQ+gVeluhi4TIc//zDJuPMZVZxik= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Baoquan He To: Christoph Hellwig Cc: linux-mm@kvack.org, akpm@linux-foundation.org, chrisl@kernel.org, usama.arif@linux.dev, baohua@kernel.org, kasong@tencent.com, nphamcs@gmail.com, shikemeng@huaweicloud.com, youngjun.park@lge.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 2/3] mm/swap: use swap_ops to register swap device's methods Message-ID: References: <20260512104201.716213-1-baoquan.he@linux.dev> <20260512104201.716213-3-baoquan.he@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: X-Migadu-Flow: FLOW_OUT On 05/12/26 at 10:45pm, Christoph Hellwig wrote: > Looking a bit more I also think this abastraction is still leaky because > the unplug calls for fs based swap aren't properly abstracted out. Right, and this can be easily done by adding a unplug callback in swap_ops. > > (note that it would make sense to use them for block based swap as well, > as building a single bio will be a lot more efficient than relying on > block layer plugging, but that's a separate issue) OK, look forward to seeing it from your post.