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=-5.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 C1241C38A24 for ; Thu, 7 May 2020 16:31:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7F9C920575 for ; Thu, 7 May 2020 16:31:48 +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="qI+OiMJG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7F9C920575 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 1CECC900003; Thu, 7 May 2020 12:31:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 17FD2900002; Thu, 7 May 2020 12:31:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0466B900003; Thu, 7 May 2020 12:31:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id E2638900002 for ; Thu, 7 May 2020 12:31:47 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id A85A2180ACF61 for ; Thu, 7 May 2020 16:31:47 +0000 (UTC) X-FDA: 76790464254.10.spy82_f9d135ed8f2c X-HE-Tag: spy82_f9d135ed8f2c X-Filterd-Recvd-Size: 3859 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf09.hostedemail.com (Postfix) with ESMTP for ; Thu, 7 May 2020 16:31:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=3gVdJM0Xac05/DiybGJ/iKfbblmg8k1slb7wrkVhFUM=; b=qI+OiMJGTT/r2plFsf+28wiPCI 2xuIGAdK5DgYeC9KRbpiSZGpcscy3znvULgRQl4/ouzMBqIIKlcHAjVgi5TIlJ5h1RAb/XaaKf4Hh sx9Ab1+0i9/rCgwZtdxmK4sMm0guanzI6yHXKGcGlhzXmDMgLemdTXQm4vstJrMlnY8ML0UcrYf1P GST/iKWJScGCRYQKZk4G2cN1h1y6WVAFy2xPBq/KaTS9Q6Q+KP2UT4BNTCzPi89nTUUfidkVCquYO 6T55jp+vxkDkvvKZL1iWyJEuCc7rMRgdM7ze8AtbgmtGnQAArI8a07xIIhiI40EjUqtcOa4z/dU30 yHYpQt7Q==; Received: from [2601:1c0:6280:3f0::19c2] by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jWjQH-0008QS-Do; Thu, 07 May 2020 16:30:57 +0000 Subject: Re: [RFC 34/43] shmem: PKRAM: multithread preserving and restoring shmem pages To: Anthony Yznaga , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: willy@infradead.org, corbet@lwn.net, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com, dave.hansen@linux.intel.com, luto@kernel.org, peterz@infradead.org, rppt@linux.ibm.com, akpm@linux-foundation.org, hughd@google.com, ebiederm@xmission.com, masahiroy@kernel.org, ardb@kernel.org, ndesaulniers@google.com, dima@golovin.in, daniel.kiper@oracle.com, nivedita@alum.mit.edu, rafael.j.wysocki@intel.com, dan.j.williams@intel.com, zhenzhong.duan@oracle.com, jroedel@suse.de, bhe@redhat.com, guro@fb.com, Thomas.Lendacky@amd.com, andriy.shevchenko@linux.intel.com, keescook@chromium.org, hannes@cmpxchg.org, minchan@kernel.org, mhocko@kernel.org, ying.huang@intel.com, yang.shi@linux.alibaba.com, gustavo@embeddedor.com, ziqian.lzq@antfin.com, vdavydov.dev@gmail.com, jason.zeng@intel.com, kevin.tian@intel.com, zhiyuan.lv@intel.com, lei.l.li@intel.com, paul.c.lai@intel.com, ashok.raj@intel.com, linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org, kexec@lists.infradead.org References: <1588812129-8596-1-git-send-email-anthony.yznaga@oracle.com> <1588812129-8596-35-git-send-email-anthony.yznaga@oracle.com> From: Randy Dunlap Message-ID: <4e44858d-a416-696e-0d65-0b5ca8836b7d@infradead.org> Date: Thu, 7 May 2020 09:30:55 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <1588812129-8596-35-git-send-email-anthony.yznaga@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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 5/6/20 5:42 PM, Anthony Yznaga wrote: > Improve performance by multithreading the work to preserve and restore > shmem pages. > > Add 'pkram_max_threads=' kernel option to specify the maximum number > of threads to use to preserve or restore the pages of a shmem file. > The default is 16. Hi, Please document kernel boot options in Documentation/admin-guide/kernel-parameters.txt. > When preserving pages each thread saves chunks of a file to a pkram_obj > until no more no more chunks are available. > > When restoring pages each thread loads pages using a copy of a > pkram_stream initialized by pkram_prepare_load_obj(). Under the hood > each thread ends up fetching and operating on pkram_link pages. > > Signed-off-by: Anthony Yznaga > --- > include/linux/pkram.h | 2 + > mm/shmem_pkram.c | 101 +++++++++++++++++++++++++++++++++++++++++++++++++- > 2 files changed, 101 insertions(+), 2 deletions(-) thanks. -- ~Randy