From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751424AbdBWO43 (ORCPT ); Thu, 23 Feb 2017 09:56:29 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:33588 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751041AbdBWO41 (ORCPT ); Thu, 23 Feb 2017 09:56:27 -0500 Date: Thu, 23 Feb 2017 17:56:23 +0300 From: "Kirill A. Shutemov" To: Andrea Arcangeli Cc: Mike Kravetz , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Mike Rapoport , "Dr. David Alan Gilbert" , Hillf Danton , Pavel Emelyanov Subject: Re: [PATCH] userfaultfd: hugetlbfs: add UFFDIO_COPY support for shared mappings Message-ID: <20170223145623.GA855@node.shutemov.name> References: <1487195210-12839-1-git-send-email-mike.kravetz@oracle.com> <20170216184100.GS25530@redhat.com> <20170221132545.GD13174@node.shutemov.name> <20170222151507.GI5037@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170222151507.GI5037@redhat.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 22, 2017 at 04:15:07PM +0100, Andrea Arcangeli wrote: > On Tue, Feb 21, 2017 at 04:25:45PM +0300, Kirill A. Shutemov wrote: > > I think more strict vma_is_anonymous() is a good thing. > > > > But I don't see a point introducing one more helper. Let's just make the > > existing helper work better. > > That would be simpler agreed. The point of having an "unsafe" faster > version was only for code running in page fault context where the > additional check is unnecessary. Well, I don't think that the cost of additional check is significant here. And we can bring ->vm_ops a bit closer to ->vm_flags to avoid potential cache miss. -- Kirill A. Shutemov