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=-6.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 302D6C433E0 for ; Fri, 5 Feb 2021 00:50:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 98F1164F51 for ; Fri, 5 Feb 2021 00:50:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 98F1164F51 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 E38B46B0006; Thu, 4 Feb 2021 19:50:40 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DE9416B006C; Thu, 4 Feb 2021 19:50:40 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CD7886B006E; Thu, 4 Feb 2021 19:50:40 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0236.hostedemail.com [216.40.44.236]) by kanga.kvack.org (Postfix) with ESMTP id AA6286B0006 for ; Thu, 4 Feb 2021 19:50:40 -0500 (EST) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 7833D3634 for ; Fri, 5 Feb 2021 00:50:40 +0000 (UTC) X-FDA: 77782383840.05.class47_3d000f2275e0 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin05.hostedemail.com (Postfix) with ESMTP id 6107C1826B6B2 for ; Fri, 5 Feb 2021 00:50:40 +0000 (UTC) X-HE-Tag: class47_3d000f2275e0 X-Filterd-Recvd-Size: 4450 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by imf12.hostedemail.com (Postfix) with ESMTP for ; Fri, 5 Feb 2021 00:50:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612486239; 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: in-reply-to:in-reply-to:references:references; bh=6v5TiNmyjzkurZGYafla6AYhWRmxphUxOH88crjqEbY=; b=geMFvQ3ROpSBH2MECfBC+CgtDssV/3f8vhb2A+mTrD6F5XzXxGudKBGoQpnIaZPquXAYlz UdC/Hm6IUDAvHeHaZH0qYKEC+H2XmFWl1+EWZm93l4B0YSY13WVl+7QdOR1Tg+GC5St94l sEVvDi/nLA+cSfoB8uyfXaY1Gi5bKQY= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-446--6EZc82KMvKNrBJGBBPqqQ-1; Thu, 04 Feb 2021 19:50:35 -0500 X-MC-Unique: -6EZc82KMvKNrBJGBBPqqQ-1 Received: by mail-qv1-f69.google.com with SMTP id h13so3635458qvs.13 for ; Thu, 04 Feb 2021 16:50:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=6v5TiNmyjzkurZGYafla6AYhWRmxphUxOH88crjqEbY=; b=hU22WLduP3q5NPmHSZm5+Og5xQS12sqZrle5jUa3N7W12JBjz2EXYoAhDod3iicDRJ 1YkKjDlUqa2fzeIB37gP40Xy/4zAy9A2OY8Z8bQC3SIqt531m1yrVeEIV8efoq3YNm+I cEpkuSzJS/yl0Wmbu6QtKHa5wo3cQwTmiUlXkPXRUjQ4YPdWF/yuva/ec4AR8lFquNI/ 1B9Eu4+AwfCkw3Jnr3XkYlvixFIv7SPiYvXYNqrKrwkY7XvEwBQcHDbV0eUlBKBYitFd 2GEz2IQN3WTSOxW2Z4TfoJ/3VXmGeEq6GyhYQf3LHA1b6BYJYzOJqu5f2bd9ENTDiRz5 Vbyg== X-Gm-Message-State: AOAM530npf9Iqz1FN6kyUBhegWkvtee1+9Lq8NWrHN1tO4qIeozFbWD6 wcN2KAtk6INfbPo6Qv9oEfdTEZpWJLC4gGH1h/X25MK81IEt5bsp0pgLjKf6DEPryFWTcxFkP9o 8FkXwW4+Qn6U= X-Received: by 2002:a05:6214:324:: with SMTP id j4mr2144896qvu.53.1612486235393; Thu, 04 Feb 2021 16:50:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJy7qrh6iNID1eoLV0V7+VhGQH6n5gRYEh7QKZNVn5dKdj3gSmdetD8tJAow+8oPOZf30i7ang== X-Received: by 2002:a05:6214:324:: with SMTP id j4mr2144874qvu.53.1612486235137; Thu, 04 Feb 2021 16:50:35 -0800 (PST) Received: from xz-x1 (bras-vprn-toroon474qw-lp130-20-174-93-89-182.dsl.bell.ca. [174.93.89.182]) by smtp.gmail.com with ESMTPSA id l35sm6070844qtd.90.2021.02.04.16.50.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 16:50:34 -0800 (PST) Date: Thu, 4 Feb 2021 19:50:32 -0500 From: Peter Xu To: Jason Gunthorpe Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Kirill Shutemov , Wei Zhang , Mike Rapoport , Matthew Wilcox , Miaohe Lin , Andrea Arcangeli , Gal Pressman , Jan Kara , Jann Horn , Andrew Morton , Kirill Tkhai , Linus Torvalds , Mike Kravetz , David Gibson , Christoph Hellwig Subject: Re: [PATCH v2 3/4] mm: Introduce page_needs_cow_for_dma() for deciding whether cow Message-ID: <20210205005032.GV6468@xz-x1> References: <20210204145033.136755-1-peterx@redhat.com> <20210204145033.136755-4-peterx@redhat.com> <20210204232000.GG4718@ziepe.ca> MIME-Version: 1.0 In-Reply-To: <20210204232000.GG4718@ziepe.ca> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=peterx@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline 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 Thu, Feb 04, 2021 at 07:20:00PM -0400, Jason Gunthorpe wrote: > > +static inline bool is_cow_mapping(vm_flags_t flags) > > +{ > > It feels a bit more logical to pass in a struct vm_area_struct *' here? Agree, but only if I'm adding this as a new function. Though it's a code movement from internal.h to mm.h, so I avoided touching all the users of this function that existed. Thanks, -- Peter Xu