Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3071668pxb; Sat, 23 Oct 2021 15:26:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydI9ABTNaUZ2hN7TaOPNJS+QAnNi1ibZZZmxxqie8Cks1v/Vob84osKBQsjyfnZoDBL70S X-Received: by 2002:a50:e0cf:: with SMTP id j15mr12439496edl.23.1635028012501; Sat, 23 Oct 2021 15:26:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635028012; cv=none; d=google.com; s=arc-20160816; b=LQssBIEWdunDIYBMuEkFGHFz9ZYtww4lC3oVlb37ab+4pvHZo7PW2nCbi0Z3TAXtRW 3q/9pTRPW2uw637crypqDUwclHHzpmAxgqiI/0fwwam6ZcNAzQD1T1EslpqU3GtAU+to L1wz2L71Ja0/fQqbyWUpcXCYwORMMjfZdQZSdZ0Rnezmkvv4V3y6/qZdTY1E1HdWlhIe 88/Yn9VWfo/MgVJ+EX0mtba8LbicXhVo04EtHMND2h8w09J7q4cjP5DXWJ9s+eiP2hiQ USr4Tny02llUb3+KyncuA1zJVMeb4pU19E0Tmi4RRrK88370+P+pYMc36uH5eu3VPhXX r8Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/iY4mkP5CITw30ncTBqe0r7VHjZK/w2eKc4vTccqfLc=; b=1JDEuENyCLKZdN5NvxI9m9aTBgu7wg5Pq2VzXkF7lSzy1PNp9tGaV/chBE/HrKlNcr Vukts4JXDw1G44OZ2LLjDrlyW7sow2dqcrR9alps5zlam8r6ZWhoN812+NYiUMx+02L4 arP0teAu01RnO8oyju664MZNgn0AfM8yV6xmVBylwsi6hxfrDG4Cvx22atbOPqazSLHI O9uXZaoF6bOQUUYwkK/jLrFCxi7MQOPIT+JgjD+UaSqavpNG4bN4f6NDBQViyZvImcoy lyNDE3rt/84XgFJVwhbxrK0fflPlyvh2GXtJDTqubMMUpUjYwKNOGH/mfsQEZp9scPmo 6lJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="gh/3JLk/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qb29si22374648ejc.678.2021.10.23.15.26.15; Sat, 23 Oct 2021 15:26:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="gh/3JLk/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231186AbhJWW0B (ORCPT + 99 others); Sat, 23 Oct 2021 18:26:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229730AbhJWW0B (ORCPT ); Sat, 23 Oct 2021 18:26:01 -0400 Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D12EC061714; Sat, 23 Oct 2021 15:23:41 -0700 (PDT) Received: by mail-qk1-x730.google.com with SMTP id h65so8366478qke.0; Sat, 23 Oct 2021 15:23:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/iY4mkP5CITw30ncTBqe0r7VHjZK/w2eKc4vTccqfLc=; b=gh/3JLk/ek1VRq0um4wQVJYOtNPOizsFL4Nyqh6Tkrr9ppVbg+rMXBdbaS7Dw0xdiJ VAMBHml6WguGG1oA8yCXyzmJRnSy068h356uvWaBmAruMb3a76LOKSI7zSwEqVme2NGP yG7eIDwPrZ1MlCeqltZI1Afp2HT7PNPFpg1Rzr3fZTMchPRMUrTwoqFgXinJ2ugXztgm oeCB+NzT/+snZeJ5CD8+zzFPqoVpArUaNM+JTIwKksWGKJzO6t2uyzHwXEMy11ZB/LmA w8Ls0Qh2lOo6fROGgwvtSCRukVUIsr8K3k/Su7aIRbW69wldtz5mFkfAdz7X6mSck0tu jH6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/iY4mkP5CITw30ncTBqe0r7VHjZK/w2eKc4vTccqfLc=; b=FgtLIlixjf9s39iLjzbp6BTXwX5b3HtUtN2rueU/qnWzCXJ9eE8oFyRXhlZ+vsKvQw OEy1xhMJjPrHNIs4WGP6riEe4M7Y57o63O+RJsFT7FKX+CbQJIQshwxxeCdJfxgjB0Qn Q/bA8OCqWD9bZASun75nAhz+EkR9hO/KuuQMFKRao14CSsHadp7QCKjoibgaA9Y9t4qj M0Zgs/ToR262MtnNQULUglfVEP8h6T79tBlgxoEi0ujWBqFZWu78s+nYpXpm+PpXWrN+ BfdL1sYz2iypqBH10YmWbGN0KaXO7b8jehTnrHsmwsU4cUuMobM2VfRskH7TfVMO6WwA hZqA== X-Gm-Message-State: AOAM530D7fP7nOfdYOKWDTyHNqZ99kvrUuPbg7gWJ4HtR1spVEAKQkiT 2hj/RD/GQ337X3ostpBhvg== X-Received: by 2002:a05:620a:6bd:: with SMTP id i29mr6366027qkh.121.1635027820776; Sat, 23 Oct 2021 15:23:40 -0700 (PDT) Received: from moria.home.lan (c-73-219-103-14.hsd1.vt.comcast.net. [73.219.103.14]) by smtp.gmail.com with ESMTPSA id k8sm6263868qkk.37.2021.10.23.15.23.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Oct 2021 15:23:39 -0700 (PDT) Date: Sat, 23 Oct 2021 18:23:37 -0400 From: Kent Overstreet To: Matthew Wilcox Cc: David Hildenbrand , Johannes Weiner , "Kirill A. Shutemov" , Linus Torvalds , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Morton , "Darrick J. Wong" , Christoph Hellwig , David Howells , Hugh Dickins Subject: Re: Folios for 5.15 request - Was: re: Folio discussion recap - Message-ID: References: <326b5796-6ef9-a08f-a671-4da4b04a2b4f@redhat.com> <404bdc05-487f-3d47-6b30-0687b74c2f2f@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 23, 2021 at 10:41:41PM +0100, Matthew Wilcox wrote: > On Sat, Oct 23, 2021 at 12:00:38PM -0400, Kent Overstreet wrote: > > I ran into a major roadblock when I tried converting buddy allocator freelists > > to radix trees: freeing a page may require allocating a new page for the radix > > tree freelist, which is fine normally - we're freeing a page after all - but not > > if it's highmem. So right now I'm not sure if getting struct page down to two > > words is even possible. Oh well. > > I have a design in mind that I think avoids the problem. It's somewhat > based on Bonwick's vmem paper, but not exactly. I need to write it up. I am intruiged... Care to drop some hints? > Right. Folios are for unspecialised head pages. If we decide > to specialise further in the future, that's great! I think David > misunderstood me slightly; I don't know that specialising file + anon > pages (the aforementioned lru_mem) is the right approach. It might be! > But it needs someone to try it, and find the advantages & disadvantages. Well, that's where your current patches are basically headed, aren't they? As I understand it it's just file and some of the anon code that's converted so far. Are you thinking more along the lines of converting everything that can be mapped to userspace to folios? I think that would make a lot of sense given that converting the weird things to file pages isn't likely to happen any time soon, and it would us convert gup() to return folios, as Christoph noted. > > > Also introducing new types to be describing our current using of struct page > > isn't the only thing we should be doing - as we do that, that will (is!) uncover > > a lot of places where our ontology of struct page uses is just nonsensical (all > > the types of pages mapped into userspace!) - and part of our mission should be > > to clean those up. > > > > That does turn things into a much bigger project than what Matthew signed up > > for, but we shouldn't all be sitting on the sidelines here... > > I'm happy to help. Indeed I may take on some of these sub-projects > myself. I just don't want the perfect to be the enemy of the good. Agreed!