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=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 8588AC433E0 for ; Mon, 4 Jan 2021 14:08:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3D19D207BC for ; Mon, 4 Jan 2021 14:08:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726777AbhADOIA (ORCPT ); Mon, 4 Jan 2021 09:08:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726396AbhADOIA (ORCPT ); Mon, 4 Jan 2021 09:08:00 -0500 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70DAEC061574 for ; Mon, 4 Jan 2021 06:07:19 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id m12so64547614lfo.7 for ; Mon, 04 Jan 2021 06:07:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Noy6r1/WTM/FuD2jphA2uWS50pb5obVRw55AkQ+95cI=; b=LOnFTpkM+pp+xw2QIahN/58KTeXTmZmogfFOQDQZrae2dqqSUCXJi95ZHh+CGC80Za CIzV1m3shttpaF2xef8iCMVq7PkWeaB0pov7RFanNH8+qpm+oFIrBxpBCv0yQnyriY0K MRsXskenCYPZ/cvgb9XRtCDBB5RnpemEt5cRDLRPe9jkH7OvoIYjnOAJ2rnrcX5wWBhb Ypag2OXD3vpswjnX+xhRsSGRDjvZ7/p6RFrekWVs6y12QPsLXSzT2qmgUbPgAQLH3I2u Sg7g1oGOFo2V6Lx92H89iJCEROZmEGIqUCKS5HS3h1MemaMX4RRpFOZj1wnvzE0Py4BL 4/hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Noy6r1/WTM/FuD2jphA2uWS50pb5obVRw55AkQ+95cI=; b=pvdAcZ4BkP5I4PwM4gFwaVN19qt7+ep1BCYTQoKBqtKJEu3FuHu90sfdVWJIhw7AND hJdZdJhiKmCTrhXC2tB5ztiDD4ZRr3PivavVj1DUphj3rcI12SSPlkI4NpR/CmitvjZc rkcDUlhOjZO1g8ELtFh9R1qPqMfTRyaDWnlvzLkS/4b1uYqtB+p7sw/3KkFBX0+PUMGz 3RVODO9bdRCMyZw9HyscDQd3D3xNtaYnt2vePuXGGkzQQfZR8ZFy4ZzhVaLKpANu4MfD pU9HQ6qvHK7Ix1XDf+uUCkUsR14/9ce/ARv9JO9FPIS4FWJdza077VvZQ7KnC8V3cFsG LWqQ== X-Gm-Message-State: AOAM531sw3axENRfUg3X4crWW88maK+zXfHjLdTlIYDknC2LFHcgGS39 7yhsnwtSoNSvZrS+/Q3iEYX0PrXy/cK2lTmryCc= X-Google-Smtp-Source: ABdhPJxmxsxVDFpbXZxv3wxt4WJzq5x+LhWqUBlh10IEtDlXJufp57gIWF5eSR7AeUPhDlbdZuI/azYJnM1F0ktp4MQ= X-Received: by 2002:a2e:154b:: with SMTP id 11mr34295269ljv.22.1609769238030; Mon, 04 Jan 2021 06:07:18 -0800 (PST) MIME-Version: 1.0 References: <20201221162519.GA22504@open-light-1.localdomain> <20210104125554.GE13207@dhcp22.suse.cz> In-Reply-To: <20210104125554.GE13207@dhcp22.suse.cz> From: Liang Li Date: Mon, 4 Jan 2021 22:07:05 +0800 Message-ID: Subject: Re: [RFC v2 PATCH 0/4] speed up page allocation for __GFP_ZERO To: Michal Hocko Cc: Liang Li , Alexander Duyck , Mel Gorman , Andrew Morton , Andrea Arcangeli , Dan Williams , "Michael S. Tsirkin" , David Hildenbrand , Jason Wang , Dave Hansen , Liang Li , linux-mm , LKML , virtualization@lists.linux-foundation.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 4, 2021 at 8:56 PM Michal Hocko wrote: > > On Mon 21-12-20 11:25:22, Liang Li wrote: > [...] > > Security > > ======== > > This is a weak version of "introduce init_on_alloc=1 and init_on_free=1 > > boot options", which zero out page in a asynchronous way. For users can't > > tolerate the impaction of 'init_on_alloc=1' or 'init_on_free=1' brings, > > this feauture provide another choice. > > Most of the usecases are about the start up time imporvemtns IIUC. Have > you tried to use init_on_free or this would be prohibitive for your > workloads? > I have not tried yet. 'init_on_free' may help to shorten the start up time. In our use case, we care about both the VM creation time and the VM reboot time[terminate QEMU process first and launch a new one], 'init_on_free' will slow down the termination process and is not helpful for VM reboot. Our aim is to speed up 'VM start up' and not slow down 'VM shut down'. Thanks Liang 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=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 D4571C433DB for ; Mon, 4 Jan 2021 14:07:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 58877207BC for ; Mon, 4 Jan 2021 14:07:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 58877207BC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A52BF6B00C4; Mon, 4 Jan 2021 09:07:20 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A02036B00C5; Mon, 4 Jan 2021 09:07:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 93EBF6B00C6; Mon, 4 Jan 2021 09:07:20 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0071.hostedemail.com [216.40.44.71]) by kanga.kvack.org (Postfix) with ESMTP id 7B24F6B00C4 for ; Mon, 4 Jan 2021 09:07:20 -0500 (EST) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 40F66181AC9C6 for ; Mon, 4 Jan 2021 14:07:20 +0000 (UTC) X-FDA: 77668269840.11.cloth51_13165ab274d0 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin11.hostedemail.com (Postfix) with ESMTP id 13934180F8B80 for ; Mon, 4 Jan 2021 14:07:20 +0000 (UTC) X-HE-Tag: cloth51_13165ab274d0 X-Filterd-Recvd-Size: 4087 Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) by imf20.hostedemail.com (Postfix) with ESMTP for ; Mon, 4 Jan 2021 14:07:19 +0000 (UTC) Received: by mail-lf1-f54.google.com with SMTP id m25so64494176lfc.11 for ; Mon, 04 Jan 2021 06:07:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Noy6r1/WTM/FuD2jphA2uWS50pb5obVRw55AkQ+95cI=; b=LOnFTpkM+pp+xw2QIahN/58KTeXTmZmogfFOQDQZrae2dqqSUCXJi95ZHh+CGC80Za CIzV1m3shttpaF2xef8iCMVq7PkWeaB0pov7RFanNH8+qpm+oFIrBxpBCv0yQnyriY0K MRsXskenCYPZ/cvgb9XRtCDBB5RnpemEt5cRDLRPe9jkH7OvoIYjnOAJ2rnrcX5wWBhb Ypag2OXD3vpswjnX+xhRsSGRDjvZ7/p6RFrekWVs6y12QPsLXSzT2qmgUbPgAQLH3I2u Sg7g1oGOFo2V6Lx92H89iJCEROZmEGIqUCKS5HS3h1MemaMX4RRpFOZj1wnvzE0Py4BL 4/hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Noy6r1/WTM/FuD2jphA2uWS50pb5obVRw55AkQ+95cI=; b=mWVdFZLP4/hAvBnFfI6184vBEe2NRXq8jDRUwaIXsH8n/gb2jURdDL1aEw6psWNHTl 9O0qJ1dkvT8djwOpPAi7cxGv9xZkgcvRj5+tVl2f8+g+OPkJtpkGszK5yOsDPoctdY5f f5/9UfkSUC0SUtEAGyP5gyuByvDgK1SXU2huMJNVJoEs1swWLcJNj39tVhErO0AScv6y lNORXH1QUEpBnoCXc6+ScNpUDxcGaLOyZGMxCQHr2eGgODhahgJ/uoqB2mxFW44rRBG5 RAmxVRF+sS8bjby5lKQ/PlDgt05LBeRzLP2mwTG3T8NBT9n/qKBNec3rAFW7Sw8HQL9r sV+w== X-Gm-Message-State: AOAM530kgmxKK/xDWCEz+GooqZX5cEwulqj4ZxF9Y2NqUPe5RC0WYpYx 1/8WtDz81UNfSpb0UXdvbqR/KdMp/zYgJf++iuU= X-Google-Smtp-Source: ABdhPJxmxsxVDFpbXZxv3wxt4WJzq5x+LhWqUBlh10IEtDlXJufp57gIWF5eSR7AeUPhDlbdZuI/azYJnM1F0ktp4MQ= X-Received: by 2002:a2e:154b:: with SMTP id 11mr34295269ljv.22.1609769238030; Mon, 04 Jan 2021 06:07:18 -0800 (PST) MIME-Version: 1.0 References: <20201221162519.GA22504@open-light-1.localdomain> <20210104125554.GE13207@dhcp22.suse.cz> In-Reply-To: <20210104125554.GE13207@dhcp22.suse.cz> From: Liang Li Date: Mon, 4 Jan 2021 22:07:05 +0800 Message-ID: Subject: Re: [RFC v2 PATCH 0/4] speed up page allocation for __GFP_ZERO To: Michal Hocko Cc: Liang Li , Alexander Duyck , Mel Gorman , Andrew Morton , Andrea Arcangeli , Dan Williams , "Michael S. Tsirkin" , David Hildenbrand , Jason Wang , Dave Hansen , Liang Li , linux-mm , LKML , virtualization@lists.linux-foundation.org Content-Type: text/plain; charset="UTF-8" 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 4, 2021 at 8:56 PM Michal Hocko wrote: > > On Mon 21-12-20 11:25:22, Liang Li wrote: > [...] > > Security > > ======== > > This is a weak version of "introduce init_on_alloc=1 and init_on_free=1 > > boot options", which zero out page in a asynchronous way. For users can't > > tolerate the impaction of 'init_on_alloc=1' or 'init_on_free=1' brings, > > this feauture provide another choice. > > Most of the usecases are about the start up time imporvemtns IIUC. Have > you tried to use init_on_free or this would be prohibitive for your > workloads? > I have not tried yet. 'init_on_free' may help to shorten the start up time. In our use case, we care about both the VM creation time and the VM reboot time[terminate QEMU process first and launch a new one], 'init_on_free' will slow down the termination process and is not helpful for VM reboot. Our aim is to speed up 'VM start up' and not slow down 'VM shut down'. Thanks Liang