From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42662D44171 for ; Wed, 20 Nov 2024 09:11:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 64A5F6B007B; Wed, 20 Nov 2024 04:11:01 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5F9236B0083; Wed, 20 Nov 2024 04:11:01 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 499C76B0085; Wed, 20 Nov 2024 04:11:01 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 13C2A6B007B for ; Wed, 20 Nov 2024 04:11:01 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id A9D0D40B92 for ; Wed, 20 Nov 2024 09:11:00 +0000 (UTC) X-FDA: 82805902326.30.D45130B Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by imf09.hostedemail.com (Postfix) with ESMTP id 51E8714000F for ; Wed, 20 Nov 2024 09:10:23 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=H3x+azOy; spf=pass (imf09.hostedemail.com: domain of aliceryhl@google.com designates 209.85.221.54 as permitted sender) smtp.mailfrom=aliceryhl@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1732093613; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=taQfAO7UsVPf+OWP/Z17Mad9ERlkGUab/JxNPFh1DDw=; b=Ta4fANVHMwTKQTzMpPPsx2MfT4oroWZkUhr6WXH075szzfNWkbR6+5NmDNqsoNiVB8+Qd5 4Vi9PCAftjBsWAwHlaLF/n6JJ+2D6s2A/ig8Rzl3DmuenBwhgBDYmlRNIA9MKSeTDepFtZ 1NoHLpLqurZrOZ7f8T24D2tCfZ/zdjk= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=H3x+azOy; spf=pass (imf09.hostedemail.com: domain of aliceryhl@google.com designates 209.85.221.54 as permitted sender) smtp.mailfrom=aliceryhl@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1732093613; a=rsa-sha256; cv=none; b=VOF+wqJCRN/X3GvQJH/bVEkcgLWsCTbN2n7+Uei/StdHO3plMPiFQ80YBngz06GlJqKxi4 HZMi3w97S/epSKaa1e4POMozlB+h3IT6AgF3bJnlq2o7lMANwSqjjlVj1VvwBPlXPUF0oR v0mx1cGz2ZQH8vSlr5+7ieUOTbSRsqs= Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-382423f4082so1401922f8f.3 for ; Wed, 20 Nov 2024 01:10:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1732093857; x=1732698657; darn=kvack.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=taQfAO7UsVPf+OWP/Z17Mad9ERlkGUab/JxNPFh1DDw=; b=H3x+azOyF0E9m7iMeRINZUkTrPEt1DCx9NwgsP3QDhpOAm3oY6ZoncrMkkoVqTvERy 4NDRz/KYdM7NsKYoT/qeY6FCqJJ9fdn/h7CX3UUbIO0X6k8HEMxnWZv+Jc01Ny3TltGZ 3nMofkYkigbE8Jy010CpZw5iBpoGx7JdgrX8O28FUpI2fp16CyUKc4UKqfeZgA42D8zb +IZbpaw7l6w9LveUsM8LcjBU6Z8Sy3AHbB8kxCkD4GLnPrrx1tLUxxpidEe5Zzkhh5lo UirSMOszETnBYORrUIjsDfAnEgrhrh1PUzORDPG4C3Litwce7AiG6kn6tXlLBTa6/uht vc7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732093857; x=1732698657; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=taQfAO7UsVPf+OWP/Z17Mad9ERlkGUab/JxNPFh1DDw=; b=aQ9BqIf5ym4Xn9Zd+BiUN9zhJi5E94n+ImCi7wZCBJU38OUTFRdksasejo7fWT9LY6 5F02GkGQx+UbdPUICG8tIMhwdUNIXMzXc6y4SMavJiWc4wSL+iA0NZOmRZHxTWmWCyMq 2/ncE/6BpveC/KOXBm90FRLWRBHj/17szf9BKRCzBJGe6fk9O6lNEzQXzRLoWakM6IfA 9HunUN6xgLi/EzeKyst7QZfQQN/M1SYVKHY0ycAEXHKeuOfY+lcYsLGiBqv1TEacLaQn yoQu+J2rhXigCoAglvbOvfv+W5n63pvmC7bePLT71or3hW0e8bYpfMrKmeLyrEZq289E 9uGQ== X-Forwarded-Encrypted: i=1; AJvYcCV9jKtn+qX2k0vOZSKjiIKKD3TXkN30FylKUX9MdkKuR/ypf03JzTTXpTCeUrpKcJuene5NrHgPAQ==@kvack.org X-Gm-Message-State: AOJu0Yyb6Nx9BlVFz4rVjDxGSvuHqBidDtOkc4WtP2gshI8ui3G++GIQ yLMPmhwNLYYxnATNb1QBJMTxv9KAJiSjrjixwmeQk3uiW0vtANGBxgSynXIlTSMET6uBwKQ1q8O S5k2F4uSIYbQcP2lULw9MaA7j9tYs9Q4TVBP1 X-Google-Smtp-Source: AGHT+IE0Qr6c8zEO0W+zjaOi3AJMKcjk7pnHmZj3Gs9w6cUneUNmZHuNKxDnfUxGyGK7KDV6BRIx3PXwyrLZUoiGnjo= X-Received: by 2002:a5d:47c4:0:b0:382:499a:dc6d with SMTP id ffacd0b85a97d-38254b24de7mr1265757f8f.55.1732093857168; Wed, 20 Nov 2024 01:10:57 -0800 (PST) MIME-Version: 1.0 References: <20241119112408.779243-1-abdiel.janulgue@gmail.com> In-Reply-To: From: Alice Ryhl Date: Wed, 20 Nov 2024 10:10:44 +0100 Message-ID: Subject: Re: [PATCH v3 0/2] rust: page: Add support for existing struct page mappings To: Matthew Wilcox Cc: Abdiel Janulgue , rust-for-linux@vger.kernel.org, Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Trevor Gross , Danilo Krummrich , Wedson Almeida Filho , Valentin Obst , open list , Andrew Morton , "open list:MEMORY MANAGEMENT" , airlied@redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 51E8714000F X-Stat-Signature: 8bqkk4egn9ujte8ct748u3euqe6bsua3 X-Rspam-User: X-HE-Tag: 1732093823-777810 X-HE-Meta: U2FsdGVkX19+4Pq7psavyaKMqnIhk2vBTwtSID8sQrobJHfCH5QXZ1cTvqbdUBgZ9BR6id3XtsZB90e4ClY05H3qe0QIq3oGTQziMfdaZe+LCUKoB/8c0BSzazeTDxYK1e3Le/uz/HzLOx2vk80IplH2gfrt2wSI0ZcrrAM//HAlUaBn4I9UkEZoHy3N/0x8TS2uM3Hgezn1iIL3MhVN5QvBWlNKf6T+rM7UMSKPnAI/GwyMaSD7IznoBBFHo2x1WzXbX/ieYpYKhDXjkueOYv9CZsat9yNE8fIRxfpz8snUzQzyhImZJxsLzLkWzzYAdgwwz6CieGu3OfbdmNblwqbVhh6MhULyvZ0tlwB5ubXMVnvr9XZS+0eZ6gDTZ2irvzcKhy7GsI+KjSHkNSuOrLJoFV9PH2+xlgVgK6mDxaYZ4nzatCg8Gavy+Uh5nSfcUOwF10VJo8q379m53G4+8UPnwX18JYA+E5GLXAidp/t7aYGlnSxQWxky3P7reH68cbA97lSxp0D28aJWL5T/u2tAVYMsT6XtJLsS5J1PUUccCoh3iOn7k+unTRAuc0ppnuGlXedmArf2osi9ItFUCkZ9z8FF7dzu679i91cMWDZ/XF00F86E9zrebgqAzs1pq8VyURruNBqG59pgVfyLcVVK83aCEVnCNO6yyab4pYovzxcIWlzfn9U8V5OffC+QeaBh8N0aYiLmpflnjfXmrIvMwe1j7CrfFifgFkILM1gMyyn/0EEcatsW6T9ETrttbAh1pTWWCXMO5a8/4Oe3cFkayu1z7ygGTIB3OX/9/vLM9GI11I8sDqO4+7GAAk3ADuHLedZ+vpd/vqrzhTNntL43wA2HRmOcDqsHTFfsC5dyG6e8Sz3EuRJxkGQYZsdBKYJdF2V2cEFwsyYCNqbQaE7KQT4/j2EnyEW19GVsmNxjyxxl8ZW5uWs6c/FXPZ3gpYQ6i5Ux6GpU/PpgHCq 6CR4uzZF i9hE2SxHdaSB1YXFpFzdGNZz/WAXjOOSX1zihsI+cFUgbbYtmu3dXyGQnAQDgJy1Z7szR/Q8kOFbSiCX7YVaBH3WkEhx15wFiIAWNJGscGnbOgUrDSuUJNfD8vJGzs/1ncAtyXQ9ZHZgk/UqTFB3W7SVCqnbAEQS+HIGmKiKsfDDQEKAvyHjLur2bZFGYdD2gatMSkHck8VwISouRyso2zXFZO/Mivl6eYmtFTnOGba6Z0TmdNft7bO/FV1S0s8fKydGHMP/W7a5cC5iU0pxzChaaNWQP984jwbZ9ge7TZ4DVYXCllnl4Aj8/onO2mYJbnFVV X-Bogosity: Ham, tests=bogofilter, spamicity=0.000281, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Wed, Nov 20, 2024 at 5:57=E2=80=AFAM Matthew Wilcox wrote: > > On Tue, Nov 19, 2024 at 01:24:01PM +0200, Abdiel Janulgue wrote: > > This series aims to add support for pages that are not constructed by a= n > > instance of the rust Page abstraction, for example those returned by > > vmalloc_to_page() or virt_to_page(). > > > > Changes sinve v3: > > - Use the struct page's reference count to decide when to free the > > allocation (Alice Ryhl, Boqun Feng). > > Bleh, this is going to be "exciting". We're in the middle of a multi-yea= r > project to remove refcounts from struct page. The lifetime of a page > will be controlled by the memdesc that it belongs to. Some of those > memdescs will have refcounts, but others will not. > > We don't have a fully formed destination yet, so I can't give you a > definite answer to a lot of questions. Obviously I don't want to hold > up the Rust project in any way, but I need to know that what we're trying > to do will be expressible in Rust. > > Can we avoid referring to a page's refcount? I don't think this patch needs the refcount at all, and the previous version did not expose it. This came out of the advice to use put_page over free_page. Does this mean that we should switch to put_page but not use get_page? Alice