Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp361941pxb; Thu, 9 Sep 2021 02:41:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCqnD1g1kQ06lSY2xHW9xLjXqxHgbo38I/U2/xj0HZOfucGzFj97eO+yycDhHgvjK3qsih X-Received: by 2002:a6b:3c16:: with SMTP id k22mr1882066iob.130.1631180510596; Thu, 09 Sep 2021 02:41:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631180510; cv=none; d=google.com; s=arc-20160816; b=QlWuqV24ahjfaaN1AJAE749D/8mpl0fiKThsa5wyPWP9bB3CACghpy6PZ1i3i+qCQy fYKf5ivNdMrwK0i4/4snA8RmSnHLWNwjy38inRYIBwpvETqHxvfD7GkA1vDhUv8Bf32x Y0V2VcxEqGNaVSFSPA5jc8X7+dzAKV+b4N8nCgb4+fOV53RoA3Z3I3PjK8JCPv4QOEaC dearP5mUegkqnMVsrIXW/7Az56eYyhr5k5v6N3OKx24P60w+xcq+PVtU90yXjKwdsjmR VeY2178lBAnRyE5hH8HboG9YPhUM1xLcUXVT450z0Me2RAZ46QT9v5Hl0py04qR2WViB hAxw== 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=bnOSlvgwo3fcQLh9riyT6ozqojd3R2De1EiMDBDp+mE=; b=u3AWb9x+/0HBqrH44Fz+IpNlBkerQPWywfh3u58donWErRTamiYS+DWhIZjuobTyW2 z5S1XuYMhsSdMcFHl8JsvQobIfMYJJi/yj913wl/4H5ZXlFQ6VS9wTB34WZhQKoRMAEd B8zpxZRgr87ntQHayQfPYU+56w2MSKIDMWRzjE0SZbn5GwF3G8lUx5lunkC1hixhOsYy FwiyhC8+T401/ui8Qc9NEtCrCM8/rHDFjM25Iw/CJwqfa+gbly95HVhW5gEJ927l5Zyj uOCyGYYsyNPDts45ddmAxO6vnQEvMUQ4L3vLm1GGpgcgMJXlk84IDGorrmPbVLa4GciQ DVVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=lz6ZxGNW; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b29si1423089jav.112.2021.09.09.02.41.38; Thu, 09 Sep 2021 02:41:50 -0700 (PDT) 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=@alien8.de header.s=dkim header.b=lz6ZxGNW; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232681AbhIIJlE (ORCPT + 99 others); Thu, 9 Sep 2021 05:41:04 -0400 Received: from mail.skyhub.de ([5.9.137.197]:47068 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229927AbhIIJlD (ORCPT ); Thu, 9 Sep 2021 05:41:03 -0400 Received: from zn.tnic (p200300ec2f0e450038bb8d0575207cd8.dip0.t-ipconnect.de [IPv6:2003:ec:2f0e:4500:38bb:8d05:7520:7cd8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 390D71EC04EC; Thu, 9 Sep 2021 11:39:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1631180389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=bnOSlvgwo3fcQLh9riyT6ozqojd3R2De1EiMDBDp+mE=; b=lz6ZxGNWTQXEXVjbIOwGQdJS9eL6Oo/eyylPuVbtJg1UUgoWHJCH9DLPLv3vYI8SpieXLq BgHd6YzJh6QvYvFEWm/K/gTIgbiXO52Yo119glP3CoVNf7cXU6coc2ZxvE3X9MSAgFPfPC cbCP5j5uHQ6ar8e2jlvoDIETpkYvzyI= Date: Thu, 9 Sep 2021 11:39:40 +0200 From: Borislav Petkov To: Jinhua Wu Cc: x86@kernel.org, zelin.deng@linux.alibaba.com, jiayu.ni@linux.alibaba.com, ak@linux.intel.com, luming.yu@intel.com, fan.du@intel.com, artie.ding@linux.alibaba.com, tony.luck@intel.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, pawan.kumar.gupta@linux.intel.com, fenghua.yu@intel.com, hpa@zytor.com, ricardo.neri-calderon@linux.intel.com, peterz@infradead.org Subject: Re: [PATCH] perf: optimize clear page in Intel specified model with movq instruction Message-ID: References: <1631177151-53723-1-git-send-email-wujinhua@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1631177151-53723-1-git-send-email-wujinhua@linux.alibaba.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 09, 2021 at 04:45:51PM +0800, Jinhua Wu wrote: > Clear page is the most time-consuming procedure in page fault handling. > Kernel use fast-string instruction to clear page. We found that in specified > Intel model such as CPX and ICX, the movq instruction perform much better > than fast-string instruction when corresponding page is not in cache. > But when the page is in cache, fast string perform better. We show the test > result in the following: What you should do is show the extensive tests you've run with real-world benchmarks where you really can show 40% performance improvement. Also, the static branch "approach" you're using ain't gonna happen. If anything, another X86_FEATURE_* bit. Good luck. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette