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 X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80000C43461 for ; Thu, 22 Apr 2021 09:09:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F05CA6145D for ; Thu, 22 Apr 2021 09:09:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F05CA6145D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 607A16B0080; Thu, 22 Apr 2021 05:09:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5B6136B0081; Thu, 22 Apr 2021 05:09:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 430226B0082; Thu, 22 Apr 2021 05:09:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0186.hostedemail.com [216.40.44.186]) by kanga.kvack.org (Postfix) with ESMTP id 2AB4C6B0080 for ; Thu, 22 Apr 2021 05:09:50 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id CD8F0180322EB for ; Thu, 22 Apr 2021 09:09:49 +0000 (UTC) X-FDA: 78059430498.15.8140837 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf26.hostedemail.com (Postfix) with ESMTP id C843D40002E8 for ; Thu, 22 Apr 2021 09:09:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619082588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G62r2A54GfDdzdiRe+imbCPlMemqzfVVW4aT0ekamXo=; b=FSgu1NrsQZhQYRKQCa+l83RovzAiBqYN3dFZkwyOdTQSqIstgokINDAp2QCxLajwK+fDwp 4khtwemEP4pxFnq8m0VwYBR4hNppsnHHgFhtUyUmXtGY8WcoeXfibJ788WWISMg+lkmljQ 41dCeqLqEot4AUkcBteU/EY6MYwWhus= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-228-iS8aZNRTNAaL_Kyh3r1vtQ-1; Thu, 22 Apr 2021 05:09:47 -0400 X-MC-Unique: iS8aZNRTNAaL_Kyh3r1vtQ-1 Received: by mail-ed1-f70.google.com with SMTP id bf25-20020a0564021a59b0290385169cebf8so9015931edb.8 for ; Thu, 22 Apr 2021 02:09:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=G62r2A54GfDdzdiRe+imbCPlMemqzfVVW4aT0ekamXo=; b=V0Gb/eX5on+Q9kojNHCaOJynXLjkeoELjOFwuLe+s4PCVWTGi3L/29FYWfZ3Ul2NKx QglNTS1mZNCXnFu+rhiZOe3phPNLFoHSC/Rn82z3ckwKc0WZ76hixE08eqQO091ag4W7 0h7CsBSg1KChbyIbPYtXaZKIA6sG3S2KDGQCf1yUIJyuCa3fB9njnlWbx2duQTbUrmnV RSgRgxAtKSOSpkMGu798Ghs8YoeaVq3VV3ETM1zzI7EpCnby6WeKFvkUWOLrKaoRfVMR 9jtb/xmFZbp0Z1CUCeuNzxes50XjSqJ7YCqwvV1hAf2QYVPLYh1WgSqDkAcroAhupxnI ubbg== X-Gm-Message-State: AOAM530Nfm/Om3BNa7wG3AvVKl6WJE5fHNTZ2fM6wmTMFOSX7URNFc2t fMaoZkcBNvuNlKzc6LzqZDI0lEwv+LoEgdC483YIIakK5Hi5gBtrjHgGAxV+502nLplu2SEvL1P RBEtb7XdEjhc= X-Received: by 2002:aa7:d596:: with SMTP id r22mr2545471edq.344.1619082586163; Thu, 22 Apr 2021 02:09:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQfaODftOKrJc2tMgSOVDOmiV3CLMhTtE4fTSMHHMlyuJTpjWpd3pf6ZYUB8Y8Z1w+e9veCw== X-Received: by 2002:aa7:d596:: with SMTP id r22mr2545457edq.344.1619082586009; Thu, 22 Apr 2021 02:09:46 -0700 (PDT) Received: from [192.168.3.132] (p4ff23eb0.dip0.t-ipconnect.de. [79.242.62.176]) by smtp.gmail.com with ESMTPSA id q19sm1398879ejy.50.2021.04.22.02.09.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Apr 2021 02:09:45 -0700 (PDT) Subject: Re: (in)consistency of page/folio function naming To: Matthew Wilcox , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org References: <20210422032051.GM3596236@casper.infradead.org> From: David Hildenbrand Organization: Red Hat Message-ID: Date: Thu, 22 Apr 2021 11:09:45 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210422032051.GM3596236@casper.infradead.org> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: C843D40002E8 X-Stat-Signature: xbwjcajzj9ya9k7bn1tb1xgqcwyjjwz5 X-Rspamd-Server: rspam02 Received-SPF: none (redhat.com>: No applicable sender policy available) receiver=imf26; identity=mailfrom; envelope-from=""; helo=us-smtp-delivery-124.mimecast.com; client-ip=170.10.133.124 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1619082582-589588 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 22.04.21 05:20, Matthew Wilcox wrote: > > I'm going through my patch queue implementing peterz's request to rename > FolioUptodate() as folio_uptodate(). It's going pretty well, but it > throws into relief all the places where we're not consistent naming > existing functions which operate on pages as page_foo(). The folio > conversion is a great opportunity to sort that out. Mostly so far, I've > just done s/page/folio/ on function names, but there's the opportunity to > regularise a lot of them, eg: > > put_page folio_put > lock_page folio_lock > lock_page_or_retry folio_lock_or_retry > rotate_reclaimable_page folio_rotate_reclaimable > end_page_writeback folio_end_writeback > clear_page_dirty_for_io folio_clear_dirty_for_io > > Some of these make a lot of sense -- eg when ClearPageDirty has turned > into folio_clear_dirty(), having folio_clear_dirty_for_io() looks regular. > I'm not entirely convinced about folio_lock(), but folio_lock_or_retry() > makes more sense than lock_page_or_retry(). Ditto _killable() or > _async(). > > Thoughts? I tend to like prefixes: they directly set the topic. The only thing I'm concerned is that we end up with put_page vs. folio_put which is suboptimal. -- Thanks, David / dhildenb