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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C534C433F5 for ; Fri, 25 Feb 2022 09:02:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238854AbiBYJCg (ORCPT ); Fri, 25 Feb 2022 04:02:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238777AbiBYJCc (ORCPT ); Fri, 25 Feb 2022 04:02:32 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 25B5B35878 for ; Fri, 25 Feb 2022 01:01:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645779717; 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=1WIKnGoWFyTndm5TrLW00J+i5t/iVoIUx93nUmuDOHc=; b=eo2G9Kz42/CA6kur0toCrFGu2eXX8qRkGpirFcekZgfkpFrS/gH8301pNQ2FzKTVqIm0X9 8PzPv/sxE+Qp37k12fdvi5ZkNytJakEfgYikQh52+aMxvqtsStv/ewn3/l3/YhtkFlMZuv bqKsyo8fI5Dyg/T+VQtqZ2WHgfGFCuQ= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-267-6qRBCciCNjijU_pkSSoetg-1; Fri, 25 Feb 2022 04:01:56 -0500 X-MC-Unique: 6qRBCciCNjijU_pkSSoetg-1 Received: by mail-wm1-f71.google.com with SMTP id az39-20020a05600c602700b00380e48f5994so1064859wmb.0 for ; Fri, 25 Feb 2022 01:01:55 -0800 (PST) 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=1WIKnGoWFyTndm5TrLW00J+i5t/iVoIUx93nUmuDOHc=; b=pFDTpweXRyfq/56bUpJOkvlVGae38cdZOf+hOHouUI+scNOFUZSkZI6POvvZG9SyOa ER6TtLAHN/LJWpgdWTYJ8Cg0Xpn7MfJg8O57BpqHZ49LvJa9KQ09mu0MsKGaqXTERv4Z iPFTCbSIDkdggpQIcA/PimHHjGU/7GUElQ7axfgq6Z/vYQsci6q1rm708SXG+RJEg7sz CHEWY++QCVkwrtObTaZmEpAi72t5dZ0vslV0TJEIn+aDWtqYiYGe3IefCjU5ia83vmtO E2cC0cBf7mijkmRcZSV2xZUhYbgrfu77GquRED3QRh3vQGTAhUKCkxU/B7Hgx7hvbNVj PtAQ== X-Gm-Message-State: AOAM530hzBU/lxzruNGaAq6t7syIExTP/PEKrciq7UvJZPOwvl5hPa9W p0S6xbWEjrqTL52NeEdoZJd6sm9DDLVxPgor5Gk68Haw10wUewrV0ye8eNNS993XSM9m+whMXki SUV7sHqeKpXa4JLcDqrZ0OeA7 X-Received: by 2002:a05:600c:48a:b0:380:3f3a:e08e with SMTP id d10-20020a05600c048a00b003803f3ae08emr1769645wme.1.1645779714883; Fri, 25 Feb 2022 01:01:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJwDy1KgcWpVNdM33QEotT9nlakyx3ll+DkMH6nzYwAtc/XVtP6ENwJ5ePrhSbMpW4nc7Aoc8g== X-Received: by 2002:a05:600c:48a:b0:380:3f3a:e08e with SMTP id d10-20020a05600c048a00b003803f3ae08emr1769625wme.1.1645779714630; Fri, 25 Feb 2022 01:01:54 -0800 (PST) Received: from ?IPV6:2003:cb:c706:1900:f2f7:d2ad:80d9:218f? (p200300cbc7061900f2f7d2ad80d9218f.dip0.t-ipconnect.de. [2003:cb:c706:1900:f2f7:d2ad:80d9:218f]) by smtp.gmail.com with ESMTPSA id v25-20020a05600c215900b0038117f41728sm3695546wml.43.2022.02.25.01.01.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 25 Feb 2022 01:01:54 -0800 (PST) Message-ID: Date: Fri, 25 Feb 2022 10:01:52 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH RFC 05/13] mm/rmap: remove do_page_add_anon_rmap() Content-Language: en-US To: Linus Torvalds Cc: Linux Kernel Mailing List , Andrew Morton , Hugh Dickins , David Rientjes , Shakeel Butt , John Hubbard , Jason Gunthorpe , Mike Kravetz , Mike Rapoport , Yang Shi , "Kirill A . Shutemov" , Matthew Wilcox , Vlastimil Babka , Jann Horn , Michal Hocko , Nadav Amit , Rik van Riel , Roman Gushchin , Andrea Arcangeli , Peter Xu , Donald Dutile , Christoph Hellwig , Oleg Nesterov , Jan Kara , Liang Zhang , Pedro Gomes , Oded Gabbay , Linux-MM References: <20220224122614.94921-1-david@redhat.com> <20220224122614.94921-6-david@redhat.com> <064ba776-e6c6-a430-7d74-0b691123e2a9@redhat.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24.02.22 18:48, Linus Torvalds wrote: > On Thu, Feb 24, 2022 at 9:41 AM David Hildenbrand wrote: >> >> Actually, I thought about doing it similarly to what I did in >> page_alloc.c with fpi_t: >> >> typedef int __bitwise fpi_t; >> >> #define FPI_NONE ((__force fpi_t)0) >> >> I can do something similar here. > > Yeah, that looks good. And then the relevant function declarations and > definitions also have that explicit type there instead of 'int', which > adds a bit more documentation for people grepping for use. > While at it already, I'll also add a patch to drop the "bool compound" parameter from page_add_new_anon_rmap() (description only) Author: David Hildenbrand Date: Fri Feb 25 09:38:11 2022 +0100 mm/rmap: drop "compound" parameter from page_add_new_anon_rmap() New anonymous pages are always mapped natively: only THP/khugepagd code maps a new compound anonymous page and passes "true". Otherwise, we're just dealing with simple, non-compound pages. Let's give the interface clearer semantics and document these. Signed-off-by: David Hildenbrand -- Thanks, David / dhildenb