Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp13795445pxu; Mon, 4 Jan 2021 04:53:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJwxd1/O0zI3TBoqQH9VPa6paPeSvAF47A3WfJKwnTmwYLAOOO9gzhZ/HKpsdt18rn5AN8Xk X-Received: by 2002:a17:906:358c:: with SMTP id o12mr59363411ejb.301.1609764816433; Mon, 04 Jan 2021 04:53:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609764816; cv=none; d=google.com; s=arc-20160816; b=LXG6ZWgzw4hMncJwjHkJxjl+oXR49YNKhFLvj9uvK81kbSldS81EluOxGRQ/11zQ6/ k84Lq8/iWrv926ED64a6Pr0BbB+bX07wVdiGNZ7/qOlzUFsf+o8KTZL9vYkC73DjVYfx cTO3nrLTNR9v+OJWrCfnKF7Rb1lhfqjgI3cPFzpG4vr8JzYRtl5U0Y6lnk3gknvu4lAl nrTyn4ZJ9kWXcDxQFQaHuU9gYUTIyTDj1YuYD3VDsyzuIH9ls2D5siY8kt4OuONpjQC6 UvGTLhgUrVqQOgh7nzLIM/5Xj1n94tPNPNRCLrCAWjrCQdRTZvrhZkaMM3jLGw34x085 Ll9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=FB8hy0U9RwYKVBKY1CojR4FapZx1ziXIahEY9it/cng=; b=hg+GERSUMHb2eIJQDoKZZowaeN9ibB4F1EMT5S6AvZGuLvKaNwAyzWNss+/9+b28yc XVFAQr8yTBmuxGP7oCsYE+d5AApYHIWv5YZmZcp7oUC7MpTmui7eu4q6YKvw6e5XRlKD IJilMwCypWtLKstxaFJ72QWoWFW06UDEIhb9SxxG70a3X6WWgYWqAr6Gra697bcGjRdF cvOVl0gkpYa0AwMbeQcL6U95uDQ71x9tHl80stQLGi7k/j4WlfBge5q9t0xFAsEhPIIZ IjwRSFuvGXJYxNlI3df6oJoZJSt/NhtBGLLVdaKHfn1C45Rzl9fOgMsr7B7sWTgAV8Un 3HQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=OuLz91gD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g25si31089252edr.220.2021.01.04.04.53.13; Mon, 04 Jan 2021 04:53:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=OuLz91gD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726643AbhADMwQ (ORCPT + 99 others); Mon, 4 Jan 2021 07:52:16 -0500 Received: from mx2.suse.de ([195.135.220.15]:52650 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726608AbhADMwP (ORCPT ); Mon, 4 Jan 2021 07:52:15 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1609764688; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FB8hy0U9RwYKVBKY1CojR4FapZx1ziXIahEY9it/cng=; b=OuLz91gDvfLpxzWsAlBiGbMZM6Pia2k8ev2LOZsYiMlx1v/WnHaWSHkS+w7rqSmORZG+27 Wk5cyIHHQhAe/FQQr+pOPXiiFpk5GJFf2bqvFEzghJ5HXjtFwE9Yb6hnSTbHJfXtqtCV7c Qj7AjF6aRtoaR5ATecWr5hCzup66iq0= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 60094ACAF; Mon, 4 Jan 2021 12:51:28 +0000 (UTC) Date: Mon, 4 Jan 2021 13:51:22 +0100 From: Michal Hocko To: Liang Li Cc: Matthew Wilcox , Alexander Duyck , Mel Gorman , Andrew Morton , Andrea Arcangeli , Dan Williams , "Michael S. Tsirkin" , David Hildenbrand , Jason Wang , Dave Hansen , Liang Li , linux-mm@kvack.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: Re: [RFC v2 PATCH 0/4] speed up page allocation for __GFP_ZERO Message-ID: <20210104125122.GD13207@dhcp22.suse.cz> References: <20201221162519.GA22504@open-light-1.localdomain> <20201222122312.GH874@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 22-12-20 22:42:13, Liang Li wrote: > > > ===================================================== > > > QEMU use 4K pages, THP is off > > > round1 round2 round3 > > > w/o this patch: 23.5s 24.7s 24.6s > > > w/ this patch: 10.2s 10.3s 11.2s > > > > > > QEMU use 4K pages, THP is on > > > round1 round2 round3 > > > w/o this patch: 17.9s 14.8s 14.9s > > > w/ this patch: 1.9s 1.8s 1.9s > > > ===================================================== > > > > The cost of zeroing pages has to be paid somewhere. You've successfully > > moved it out of this path that you can measure. So now you've put it > > somewhere that you're not measuring. Why is this a win? > > Win or not depends on its effect. For our case, it solves the issue > that we faced, so it can be thought as a win for us. If others don't > have the issue we faced, the result will be different, maybe they will > be affected by the side effect of this feature. I think this is your > concern behind the question. right? I will try to do more tests and > provide more benchmark performance data. Yes, zeroying memory does have a noticeable overhead but we cannot simply allow tasks to spil over this overhead to all other users by default. So if anything this would need to be an opt-in feature configurable by administrator. -- Michal Hocko SUSE Labs