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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB97EC433EF for ; Thu, 21 Oct 2021 07:21:28 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 75B116109F for ; Thu, 21 Oct 2021 07:21:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 75B116109F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id D8C8A6B0071; Thu, 21 Oct 2021 03:21:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D3C2E6B0072; Thu, 21 Oct 2021 03:21:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C03D3900002; Thu, 21 Oct 2021 03:21:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0182.hostedemail.com [216.40.44.182]) by kanga.kvack.org (Postfix) with ESMTP id B02B76B0071 for ; Thu, 21 Oct 2021 03:21:27 -0400 (EDT) Received: from smtpin39.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 6975A180257D7 for ; Thu, 21 Oct 2021 07:21:27 +0000 (UTC) X-FDA: 78719599014.39.DFAEF4F Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf16.hostedemail.com (Postfix) with ESMTP id EBE56F00008C for ; Thu, 21 Oct 2021 07:21:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634800886; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xbiMCdPk4CEnFtd1xtVopkXI3HjYso6lcRUCflFZfhw=; b=Abr2F82SNFK3XlUU5PgPK4fOkxev+eM2Meh+RDgQIenmc5dFwGK2Ig6GHQzy4QkqSfHq7R dV+k64BhU9NCUOrvr/UuSakGYn5P9pqprvmz+tvm/cxh1oNmftS4IlEbWK0ZoSfX34vNHt lPt0FJgTgm69wyl2D2DMGGovXRkfywg= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-141-unNeXX4vPGOOkR1U4HUEyg-1; Thu, 21 Oct 2021 03:21:20 -0400 X-MC-Unique: unNeXX4vPGOOkR1U4HUEyg-1 Received: by mail-wr1-f70.google.com with SMTP id p12-20020adfc38c000000b00160d6a7e293so10960358wrf.18 for ; Thu, 21 Oct 2021 00:21:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=xbiMCdPk4CEnFtd1xtVopkXI3HjYso6lcRUCflFZfhw=; b=Uc+tHz3V9FmknkDimiFVtCHe9QDfa8TjIW9FrXoWiw0lHiM2Uj8E2tq6L0xHdHo02n TdcLD9FT/cfnVwyX0sIpg1CLAzxu8BsQ2pt7/E+xplLfkHNShYmbesDZWo1BxBUUYits bfxQTN+qE8aAfpkz2QKizEQ5VSz2uj+IlIeHwZohr77WTOXjDXvGl2/bDjR/kHf+sE2e 5oe5ymh+I3Uv8K1OhNxyyyTMD2fKgXLz8SyAVxv6URD7VCVjVORwDMxNZ+9u34Nj4QkA X04vcNIl5Gj1PgyDzbcPPBEVafFFRv7fLQvZ5lBTllhdfe05HCYFiUUkPZfIs/gWaQra Lzug== X-Gm-Message-State: AOAM530ajr+30zIhShVEVOYXptxyJw4oONvaPvrPheBU41Y4acRfY73G Z89UemNEUFW/3+MOIGj4B5QCG904qEuXZ7653pKqAfajvu4mx6uG019q5I1Pj7pui21TvEdTx0e o4+mcZJIg8vY= X-Received: by 2002:a5d:5989:: with SMTP id n9mr1793772wri.8.1634800878918; Thu, 21 Oct 2021 00:21:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxxym2D+JRIWHIru6Ae9Fw3KKewTwDtEVGqqzNoEEwHXfYycIoHeYKsjh4hMZVx/AHj6lPGg== X-Received: by 2002:a5d:5989:: with SMTP id n9mr1793737wri.8.1634800878636; Thu, 21 Oct 2021 00:21:18 -0700 (PDT) Received: from [192.168.3.132] (p4ff23aba.dip0.t-ipconnect.de. [79.242.58.186]) by smtp.gmail.com with ESMTPSA id u16sm6265534wmc.21.2021.10.21.00.21.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Oct 2021 00:21:18 -0700 (PDT) Message-ID: Date: Thu, 21 Oct 2021 09:21:17 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: Folios for 5.15 request - Was: re: Folio discussion recap - To: Christoph Hellwig Cc: Matthew Wilcox , Johannes Weiner , "Kirill A. Shutemov" , Kent Overstreet , Linus Torvalds , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Morton , "Darrick J. Wong" , David Howells , Hugh Dickins References: <20211018231627.kqrnalsi74bgpoxu@box.shutemov.name> <996b3ac4-1536-2152-f947-aad6074b046a@redhat.com> <436a9f9c-d5af-7d12-b7d2-568e45ffe0a0@redhat.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: EBE56F00008C X-Stat-Signature: w1ug8t6csq633ab9ran993efppr11pxm Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Abr2F82S; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf16.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.129.124) smtp.mailfrom=david@redhat.com X-HE-Tag: 1634800883-813603 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 21.10.21 08:51, Christoph Hellwig wrote: > On Wed, Oct 20, 2021 at 08:04:56PM +0200, David Hildenbrand wrote: >> real): assume we have to add a field for handling something about anon >> THP in the struct page (let's assume in the head page for simplicity). >> Where would we add it? To "struct folio" and expose it to all other >> folios that don't really need it because it's so special? To "struct >> page" where it actually doesn't belong after all the discussions? And if >> we would have to move that field it into a tail page, it would get even >> more "tricky". >> >> Of course, we could let all special types inherit from "struct folio", >> which inherit from "struct page" ... but I am not convinced that we >> actually want that. After all, we're C programmers ;) >> >> But enough with another side-discussion :) > > FYI, with my block and direct I/O developer hat on I really, really > want to have the folio for both file and anon pages. Because to make > the get_user_pages path a _lot_ more efficient it should store folios. > And to make that work I need them to work for file and anon pages > because for get_user_pages and related code they are treated exactly > the same. Thanks, I can understand that. And IMHO that would be even possible with split types; the function prototype will simply have to look a little more fancy instead of replacing "struct page" by "struct folio". :) -- Thanks, David / dhildenb