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=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 57A07C352A3 for ; Thu, 13 Feb 2020 21:54:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0076C218AC for ; Thu, 13 Feb 2020 21:54:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="JUCjWosC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0076C218AC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 66BAB6B05B2; Thu, 13 Feb 2020 16:54:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5F5016B05B3; Thu, 13 Feb 2020 16:54:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4E4AA6B05B4; Thu, 13 Feb 2020 16:54:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0123.hostedemail.com [216.40.44.123]) by kanga.kvack.org (Postfix) with ESMTP id 32C856B05B2 for ; Thu, 13 Feb 2020 16:54:14 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id D4D68181AEF10 for ; Thu, 13 Feb 2020 21:54:13 +0000 (UTC) X-FDA: 76486457586.08.clock94_7bfb29dbd6e18 X-HE-Tag: clock94_7bfb29dbd6e18 X-Filterd-Recvd-Size: 2678 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf02.hostedemail.com (Postfix) with ESMTP for ; Thu, 13 Feb 2020 21:54:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=JyU0rTzWIOZXHdzuOIC0sk/P2lDRoKyKc+orwy6Pvkg=; b=JUCjWosCsF/uyIQ2RLsHAFG25b s2FTef0lyOTfEC+hsrv/zJSdk4Vny0OXoK0L6x567feg0/GfTiWRBy1xn/W8e+qze28TacDYEakwL GcKFqwiUwSsgKayol82ei+4d5vCmbI/oO3onkccNg2y45hQ7oBJrcppIlrmgmADtOrPRWsYiJHIZO jkKsf4gsCb8aJXWJvyM8xkP1PUFUDNPmn+3S1fJCJ9vRHKaPkzWYENbtY7uI3Un1Qw0ScYq33l7T2 NmQ8dr9fvKFZzg90rDcGFKYlXNIZ5hOCjH2TCeFxumE+DfsF34cJIYM/VF4fLy3TmdDNg/6mLGY+T jvt+7oPg==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1j2MQx-0006jb-Dh; Thu, 13 Feb 2020 21:54:07 +0000 Date: Thu, 13 Feb 2020 13:54:07 -0800 From: Matthew Wilcox To: Arjun Roy Cc: davem@davemloft.net, netdev@vger.kernel.org, akpm@linux-foundation.org, linux-mm@kvack.org, arjunroy@google.com, Eric Dumazet , Soheil Hassas Yeganeh Subject: Re: [PATCH resend mm,net-next 2/3] mm: Add vm_insert_pages(). Message-ID: <20200213215407.GT7778@bombadil.infradead.org> References: <20200128025958.43490-1-arjunroy.kdev@gmail.com> <20200128025958.43490-2-arjunroy.kdev@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200128025958.43490-2-arjunroy.kdev@gmail.com> 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 Mon, Jan 27, 2020 at 06:59:57PM -0800, Arjun Roy wrote: > int vm_insert_page(struct vm_area_struct *, unsigned long addr, struct page *); > +int vm_insert_pages(struct vm_area_struct *vma, unsigned long addr, > + struct page **pages, unsigned long *num); > int vm_insert_pfn(struct vm_area_struct *vma, unsigned long addr, > unsigned long pfn); Sorry I didn't notice these patches earlier. I'm not thrilled about the addition of a new vm_insert_* operation; we're moving towards a vmf_insert_* API. There are almost no users left of vm_insert_page (10, at a quick count). Once they're all gone, we can switch the underlying primitives over to a vm_fault_t return type and get rid of the errno-to-vm-fault translation step that currently goes on. So ... is this called in the fault path? Do you have a struct vm_fault around? Can you handle a vm_fault_t return value instead of an errno?