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.1 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,URIBL_BLOCKED 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 3F1C4C11F64 for ; Mon, 28 Jun 2021 19:59:04 +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 0486E61CAF for ; Mon, 28 Jun 2021 19:59:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0486E61CAF 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=k2x1WcO1jnUZu0jhIo+zCyIvJUXTB7zMRVvfWZAb4oU=; b=cgjrmNrLOMdSgR u/LkUlZSEROAI1yOiHEUzKiuVI9iS0GHX0xeSKA2GwW8GMqHOZ8VYMDhtTwhyzRKu16VEdlG90FbT 3i9tbhYXzp443yJL0nN0pY25Y4vDfKUWhni0/ZwTNw+3BvtJxInG4ZkktZR3yYF+cdWHXixZTGV6E oEPSfvwI5cA5sQFNSRgiiO4YU7pk/F99J6MpBgibjy/OJJ1HgYGmZxEGiGsGt/IZQlambAyW6s4Rj lZMy4baBaxJN5yfuvheEa3RIe/N7xdV2Z0ArxdtbncsKBkZWNeSdrjyM8xC+HTOD+Q6KDBJVYr4ox 3+aYerrFkILncPWAvS/A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lxxNo-0094dy-0X; Mon, 28 Jun 2021 19:57:28 +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 1lxxNk-0094dI-90 for linux-arm-kernel@bombadil.infradead.org; Mon, 28 Jun 2021 19:57:24 +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=5mZU8eaHkGitYCk/uZMPD+d5aeydTQi9vAR1U5mhi2k=; b=JrcRDsZNk4S8DYa8U89O3uL3ow Q88duty2KLVv6mkMEFl9D1zPR80VMuiQ76pZ8TP+slMia26pg35s4DQfpEfCfncCEYRp0x4maO2R5 KPrkT75um9OgbJVCseuy3veg4wpnacFOfBKuZhL3rjEIP05lsywUgFRxAqED+2PXTYsodmdsa/RMw jWAOT+W+bC8t5eyHO0QAKKf5y5jAcmNK0lJSSu1g6lAlf+RGUTi2dQaBH3iQmEmlApFlK86s3jrww XCv5HEvse8L1tw8UiCoUrJpeknbwVD6sJ0qnkyIRG9U7feuuY/duFoijNSNWZH+ThmBTSPaowFqGs 5BgVeHbQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1lxxMh-003OEh-S6; Mon, 28 Jun 2021 19:56:50 +0000 Date: Mon, 28 Jun 2021 20:56:19 +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> <6c03ae36-9a4b-6646-66c3-04d4a3de9c1e@nvidia.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <6c03ae36-9a4b-6646-66c3-04d4a3de9c1e@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 Mon, Jun 28, 2021 at 12:44:22PM -0700, John Hubbard wrote: > On 6/28/21 12:33 PM, Matthew Wilcox wrote: > ... > > > > I wonder if single-byte captures enough of the useful possibilities. > > In the kernel we have memset32() and memset64() [1] so we could support > > a larger pattern than just an 8-bit byte. It all depends what userspace > > would find useful. > > > > [1] Along with memset_p(), memset_l() and memset16() that aren't terribly > > relevant to this use case. Although maybe memset_l() would be the right > > one to use since there probably aren't too many 32-bit apps that want > > a 64-bit pattern and memset64() might not be the fastest on a 32-bit > > kernel). > > > > And in fact, I'm also rather intrigued by doing something like 256 copies > of a 16-byte UUID, per 4KB page. In other words, there are *definitely* > useful patterns that are longer than a single byte, and it seems interesting > to support them here. > > Kirill's idea of an API that somehow allows various power of 2 patterns seems > like it would be nice, because then we don't have to pick a value that seems > good in 2021, but less good as time goes by, perhaps. > > Another thought is to use an entire 4KB page as the smallest pattern unit. > That would allow the maximum API flexibility, because the caller could > explicitly set every single byte in the page. That's what this patch does. If it can be reduced to a pattern (in Peter's patch of a single byte; i'm proposing expanding that), then the page is filled with the pattern; otherwise we copy the reference page. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel