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=-4.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 0552CC11F66 for ; Tue, 29 Jun 2021 12:00:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C062F61D40 for ; Tue, 29 Jun 2021 12:00:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C062F61D40 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Ylw7InJN+F6mUlJcZKv3lnAo1ItO/u1RFoOOF2pKuWI=; b=hhxS6ChJPrwtA/ g6DdTfmtrrGtaRmvNv7jgu9mjB18kMdawKuzfuLcF1OnLf2c++SV5AHb6IJ/1MCJutfG1Lh8QEhxv TCSRK3DgCC4AvBcqSIHBJLsM6HNbC0DuZSGGj4ClwJa5ztp77d2cyQvbae26i/b/19s96t+SD6sgo umxZ6f5ru22no1wTBUfnkpu0u+nt31z5JFUR7EotvDo7roqqJNUhFLzm7kzDyNIQXW5FHeamKE+Ti cFbsuaYhbFbSO59alva0Qocjm+fCEUqvy+wWOTe6sYyb6B4DwbnZVFK9TwXSw2nUlEIGrEBKqtrA0 k4VF5Tc1NE41ddH7GHKg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lyCOH-00AkiH-Ow; Tue, 29 Jun 2021 11:58:57 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lyCOE-00Akhg-NG for linux-arm-kernel@bombadil.infradead.org; Tue, 29 Jun 2021 11:58:54 +0000 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=EfGY/OU/KHfnG+UMGD4fPTRavasXM5eyvCC2dckCs1o=; b=gG8b4uQtZu3LtHZvhjVjE6eKeh mb6voMJdBc4w74OLxlAHDfv0I70o3sV1NZts8Y4twxMW+k9P9mCD2EDM/cWlkiqC90vsVPJ669eWj lZgGikNzFyNWYCDEJPn7j5xUYpvHVLl1GoLqY6K+K0gXcf4WyEeXDEgTiszc0GMebP/iQRgVO2Ya6 +Xe8pNph8SF7iQWHYF4FYqeSNgTF2hreghioOP4wLDtEFEfd3H1rD3C247eJ3GKqQHGYj1qdJckj5 OdOw/3L4NLBkpohRg7QvcnEOW2aapPWv/U6EPmzh+ciVaP5dmmZvw2e/+d79gsyJt07UVkB9vrjst TW9OQ+dg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1lyCO1-00442t-NH; Tue, 29 Jun 2021 11:58:46 +0000 Date: Tue, 29 Jun 2021 12:58:41 +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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <51c68f8f-dea1-c0c6-7cfb-28d42338ba88@nvidia.com> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jun 29, 2021 at 12:19:22AM -0700, John Hubbard wrote: > > +SYSCALL_DEFINE2(refpage_create, const void *__user, content, unsigned long, > > + flags) > > From the API discussion (and using a simpler syntax to illustrate this), it > seems like the following would be close: > > enum content_type { > BYTE_PATTERN, > FOUR_BYTE_PATTERN, > ... > FULL_4KB_PAGE > }; > > int refpage_create(const void *__user content, enum content_type, unsigned long flags); > > ...and if content_type == BYTE_PATTERN, then content is a pointer to just one byte of > data, and so forth for the other enum values. That seems a little more complicated and non-extensible. int refpage_create(const void *__user content, unsigned int size, unsigned long flags); _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel