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=-3.6 required=3.0 tests=BAYES_00,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 50CD0C11F67 for ; Tue, 29 Jun 2021 18:22:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7665361DE3 for ; Tue, 29 Jun 2021 18:22:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7665361DE3 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 A6B908D015D; Tue, 29 Jun 2021 14:22:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9F44C8D00F0; Tue, 29 Jun 2021 14:22:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 895888D015D; Tue, 29 Jun 2021 14:22:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0245.hostedemail.com [216.40.44.245]) by kanga.kvack.org (Postfix) with ESMTP id 5B3F38D00F0 for ; Tue, 29 Jun 2021 14:22:45 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 2EC518249980 for ; Tue, 29 Jun 2021 18:22:45 +0000 (UTC) X-FDA: 78307582290.18.4033DB9 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf15.hostedemail.com (Postfix) with ESMTP id 5AF68D000096 for ; Tue, 29 Jun 2021 18:22:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=yOCQ+6UBtisowgUHA8CBGoCBGxGhg2drXq/FhpEnlEE=; b=MK0w50S4DgiggrXCpbhJDbu6dJ Cgsv1b8HgrRsfychBcJwkAe+mJ9QTecBe2KGv9XYnRAj+6Bk3OFjL8asOxRjHvTT20OeFKV6DuXbf lRJTLekf5IEwyp/tU21+2JFVO7cSUfk6BS0GstZlNKQ8a7Nui/QL59Ee1IOzWEW2xcdcYih+XuSZ8 lyaaWtRJVX5QGGQzYnr8O523DKVITbZW/P7B2pyUwhGgTjpNlWFSTcebx/n3Nk0LoKy4NQ0xdeLig Hp8iqgeuE3KxV7lKR2phOEPXQ6aDQ3r0ZyGh1fRA+g+V5PWjIhNTJuqQaoV29a/Ec5kyFljpyxM4x R8o/xcgA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1lyIMH-004PFo-SP; Tue, 29 Jun 2021 18:21:39 +0000 Date: Tue, 29 Jun 2021 19:21:17 +0100 From: Matthew Wilcox To: John Hubbard Cc: Peter Collingbourne , "Kirill A . Shutemov" , Andrew Morton , Catalin Marinas , Evgenii Stepanov , Jann Horn , Linux ARM , linux-mm@kvack.org, kernel test robot , Linux API , linux-doc@vger.kernel.org Subject: Re: [PATCH v4] mm: introduce reference pages Message-ID: References: <20210619092002.1791322-1-pcc@google.com> <51c68f8f-dea1-c0c6-7cfb-28d42338ba88@nvidia.com> <3c77290d-3a79-9f41-f4ba-7eda399df150@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3c77290d-3a79-9f41-f4ba-7eda399df150@nvidia.com> Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=MK0w50S4; spf=none (imf15.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 5AF68D000096 X-Stat-Signature: fx8zgofg9tuie1gt93gqqtuywcdx6ps8 X-HE-Tag: 1624990964-330428 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 Tue, Jun 29, 2021 at 10:48:20AM -0700, John Hubbard wrote: > On 6/29/21 4:58 AM, Matthew Wilcox wrote: > > int refpage_create(const void *__user content, unsigned int size, > > unsigned long flags); > > > > That does seem better. The key is to have at least one more parameter. > > Actually I forgot to include pattern data. In both of the approaches above, > flags is probably used for that, but if we already know that patterns > are being passed, then how about add a "pattern" arg? I think it's > good to leave a little room for flexibility and future extensions: > > int refpage_create(const void *__user content, unsigned int size, > unsigned long pattern, unsigned long flags); I don't get it. 'size' is the length of the pattern, and it's pointed to by 'content'. Why would you pass 'pattern' as well?