From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by kanga.kvack.org (Postfix) with ESMTP id 8B1E56B000A for ; Fri, 5 Oct 2018 04:52:21 -0400 (EDT) Received: by mail-qk1-f199.google.com with SMTP id 17-v6so11469788qkj.19 for ; Fri, 05 Oct 2018 01:52:21 -0700 (PDT) Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id g36-v6sor4143106qte.83.2018.10.05.01.52.20 for (Google Transport Security); Fri, 05 Oct 2018 01:52:20 -0700 (PDT) MIME-Version: 1.0 References: <20181003185854.GA1174@jordon-HP-15-Notebook-PC> <20181003200003.GA9965@bombadil.infradead.org> <20181003221444.GZ30658@n2100.armlinux.org.uk> <20181004123400.GC30658@n2100.armlinux.org.uk> <20181004181736.GB20842@bombadil.infradead.org> In-Reply-To: From: Miguel Ojeda Date: Fri, 5 Oct 2018 10:52:09 +0200 Message-ID: Subject: Re: [PATCH v2] mm: Introduce new function vm_insert_kmem_page Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: Souptick Joarder Cc: Matthew Wilcox , linux@armlinux.org.uk, Robin van der Gracht , stefanr@s5r6.in-berlin.de, hjc@rock-chips.com, =?UTF-8?Q?Heiko_St=C3=BCbner?= , Dave Airlie , robin.murphy@arm.com, iamjoonsoo.kim@lge.com, Andrew Morton , Marek Szyprowski , Kees Cook , treding@nvidia.com, mhocko@suse.com, Dan Williams , kirill.shutemov@linux.intel.com, Mark Rutland , Andrey Ryabinin , Dmitry Vyukov , Kate Stewart , tchibo@google.com, riel@redhat.com, minchan@kernel.org, Peter Zijlstra , ying.huang@intel.com, Andi Kleen , rppt@linux.vnet.ibm.com, Dominik Brodowski , Arnd Bergmann , cpandya@codeaurora.org, hannes@cmpxchg.org, Joe Perches , mcgrof@kernel.org, Linux ARM , linux-kernel , linux1394-devel@lists.sourceforge.net, dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, Linux-MM Hi Souptick, On Fri, Oct 5, 2018 at 7:51 AM Souptick Joarder wrote: > > On Fri, Oct 5, 2018 at 1:16 AM Miguel Ojeda > wrote: > > > > > > Also, not sure if you saw my comments/review: if the interface is not > > going to change, why the name change? Why can't we simply keep using > > vm_insert_page? > > yes, changing the name without changing the interface is a > bad approach and this can't be taken. As Matthew mentioned, > "vm_insert_range() which takes an array of struct page pointers. > That fits the majority of remaining users" would be a better approach > to fit this use case. > > But yes, we can't keep vm_insert_page and vmf_insert_page together > as it doesn't guarantee that future drivers will not use vm_insert_page > in #PF context ( which will generate new errno to VM_FAULT_CODE). > Maybe I am hard of thinking, but aren't you planning to remove vm_insert_page with these changes? If yes, why you can't use the keep vm_insert_page name? In other words, keep returning what the drivers expect? Cheers, Miguel