Received: by 2002:ab2:6486:0:b0:1ef:eae8:a797 with SMTP id de6csp636396lqb; Sat, 16 Mar 2024 22:56:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUdWB287kdXhCFRHpT45rw9JYdEl0wSsjEvS3i5WHVYYHUjnUN6gAo6pbvh/j2lf3ac9+RUSoy8xAdhQnUgHsguBjFVZoOjEdFExXBOZw== X-Google-Smtp-Source: AGHT+IEvkC6n+994FxHx0bL1fIwPQGV1mhRPGykgQ84EXGAAAmVHTo95QuQkTJvn1Lyy5vkiCNC+ X-Received: by 2002:a05:622a:15d5:b0:430:a3d6:a8fb with SMTP id d21-20020a05622a15d500b00430a3d6a8fbmr11023728qty.38.1710654979530; Sat, 16 Mar 2024 22:56:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710654979; cv=pass; d=google.com; s=arc-20160816; b=yYzl/bDF32mbbcnw4WxDkGou8px6ir8nYGkbhQsrELyvLARAC4XW91urMS5h6AIzpl UGbkDsAGnC3UBO36HucoITMznDy1t/Lc5vmHfbcwWyJ7e1MGZ+pIT5Z6ALBqnRu/wiOl kH4O/ZtENnUdtv0uWqQBM3SggNoYbWd/bTDdYCijPhha1KWvmofB3UiHsbk3gDEd2CYK mTBkLL99EdR0dJ83xD+3YkzhunIkmCqB2LlEXnVxyUZTp8xW8xRn80im2lIf0hPkOtbF zNVKpJeMkIDAgqDPSWr4DrPtTeb6JfQV30mi7dXr7p8uq2R0vxN4VbENrqMlamQR4ZDh a48Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=nkEinVD8Z3SeaaGO02qIbMsBmBgYuf9Oa+IwIBedPXY=; fh=1FcdYm5qsO0F6LMV+op0FK5tx2rpziq2wxP1W1+3rys=; b=VTi7Xfxb+xktWiVLPcPRct9QqnwaX1fG16xD09cqejnPUjARUDyXjeMsd3PhSPh1Fq n1h6wX0UOf7PzLXueHW/RzHSc2vbi62+YHfgvl5GT/6cHGm0odw+ovMVlzjRuzkq00/e p9r33mxgJGiK51/zBOySt2fYEisjUWTVTEdfeb0446aP724vYO7jTMKqRSAoGGne1AeJ gLugWWway8Z6nPndG/Mm7Qe+L67sgyvnIyGiUyPw0D1NhaM/+uq3VYPYmBfQOIqOKzv2 +MfymWXOWxW3cCwQzbqmSclEJHTSwEj/vrCZgu8wXSbMioqBW61qjBE6Za75nI3thZEi p6XQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=cJ8yxGWZ; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-105325-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105325-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id l10-20020a05620a210a00b00789eca5fc61si2649338qkl.14.2024.03.16.22.56.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Mar 2024 22:56:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-105325-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=cJ8yxGWZ; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-105325-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105325-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id EBA461C21118 for ; Sun, 17 Mar 2024 02:51:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 499E46125; Sun, 17 Mar 2024 02:51:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="cJ8yxGWZ" 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 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: 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: <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