From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 6253D3233; Sun, 17 Mar 2024 02:51:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710643873; cv=none; b=FkJNEN2jymXk3Os8JtMNd399fFU+nQScvTSMpNhQVefhKP1dkKD4L7mdudTmE3T1a5mJFet4728chTekLy3B89XP8EQV/kBQmvIxpqmuAh48uqS6r5WDTlrQU5JagDwyoT+PByQ3Q9DBANVmqunqx37MXLZBFxPNqxAVV1oLzKs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710643873; c=relaxed/simple; bh=X0xxLbq5eiLdVxjFpLpPM6nLX3tXkRiD6boUh4jYdYY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=N6omZ/MxqC+QevaPKEAROluEqlpFbQ5MIORXt6IZSi535RbVo71eN62rE+WHaLm5jAUqKiN9DNbwOGEBvQ5/6F1jBU3FuWhaCwvH+bF4nk5IO2QoTqBiWiYkWburXRHlkVwxne//Eh+lpE66AHM+pOELpQv3rGwDP/XSKBUurAQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=cJ8yxGWZ; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="cJ8yxGWZ" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=nkEinVD8Z3SeaaGO02qIbMsBmBgYuf9Oa+IwIBedPXY=; b=cJ8yxGWZ1dIEnzG7mvy+UZx1FJ Y/weW5AazQmNK6D3jKrpYhl+5dKb4Jzd9atrQc936suZwPuc22B3LsbLF65dYZHVVHTCknuCebb75 aVvv2lhscgMl1CJ+fd81Vd0l7/xMlCHpTcTQoVfj44PWyr2LCpzssGXU6W6s/DiycpvJO/iIwezgs 4APj8hgAtZMSrP9kz+4dyNLrpAVv43RdkCyp3kl49znRRztH+4++vSrVggU69RMTCKXSQQR1kH021 FtNIZfVSttCm710dvM31SweZNWtW/Y1/g6IB0C5N7hYazSl245B64+EMkuJwYpavH7jB4JNSblp+t wsCWB85Q==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rlgbt-0000000Dnf7-1Yng; Sun, 17 Mar 2024 02:50:53 +0000 Date: Sun, 17 Mar 2024 02:50:53 +0000 From: Matthew Wilcox To: Andreas Hindborg Cc: Jens Axboe , Christoph Hellwig , Keith Busch , Damien Le Moal , Bart Van Assche , Hannes Reinecke , "linux-block@vger.kernel.org" , Andreas Hindborg , Niklas Cassel , Greg KH , Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Alice Ryhl , Chaitanya Kulkarni , Luis Chamberlain , Yexuan Yang <1182282462@bupt.edu.cn>, Sergio =?iso-8859-1?Q?Gonz=E1lez?= Collado , Joel Granados , "Pankaj Raghav (Samsung)" , Daniel Gomez , open list , "rust-for-linux@vger.kernel.org" , "lsf-pc@lists.linux-foundation.org" , "gost.dev@samsung.com" Subject: Re: [RFC PATCH 0/5] Rust block device driver API and null block driver Message-ID: References: <20240313110515.70088-1-nmi@metaspace.dk> Precedence: bulk X-Mailing-List: rust-for-linux@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: <20240313110515.70088-1-nmi@metaspace.dk> On Wed, Mar 13, 2024 at 12:05:07PM +0100, Andreas Hindborg wrote: > - Adopted the folio abstraction where applicable I don't think this was the correct move. The memory you're managing with folios is only used for storing the data being stored in the blkdev. It's not mapped to userspace, it doesn't make use of the flags (locked, uptodate, writeback, etc), it doesn't need an LRU list, a mapping, an index, a refcount or memcg. I think you should use pages instead of folios to keep a handle on this memory. Apologies for the confusion; we're in the middle of a years-long transition from the overly complex and overused struct page to splitting it into different data types for different purposes. More detail on this here, if you're interested: https://kernelnewbies.org/MatthewWilcox/Memdescs