Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3073704pxj; Sun, 23 May 2021 20:48:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOCh5TWExB2VReXCsyGtEgT8f9lYr9Se8B9jfgde9Ns/wpa3zMg3cmpiG+hD2bnv1PRpg1 X-Received: by 2002:a05:6e02:1bef:: with SMTP id y15mr11905421ilv.305.1621828082727; Sun, 23 May 2021 20:48:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621828082; cv=none; d=google.com; s=arc-20160816; b=SyvuhsqTKRIN0UyjQ87H5onAmr/1F+OR5bxj/RH57/rd1Oj82bDHpBX2DiSBEq5jyI cc5E3y1l9p3DG5ARdt3niLvNqi8Oo6txwODPea0EN3XQZ6tT++j2sI8C63S4s7LKoh7a WOc8vBJs79hrlRJjkdLla1MgyNY5eMvMbU5BIDmTv0FsFeBddXvvULc3MtZ6108NaAhn yXIAQJaKbkrEXS/+jl/5Sr4nwuAVE97WdWcbozrANZXgbununiztxkwppCc6t8V5dstu CYwRloxV3lFfq2WzlvJSEvghBrB0HFw/vBx3NgMqrKMPwL7dDrhikbFXcs9QHObQgtTx 0BKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:ironport-sdr:ironport-sdr; bh=K/m2wSjI0yCRSsHjNnzD1/cNVSQ/uvF0iWXYhAtYavU=; b=i1MbGTJT1LZygfcXCc2rCLRtn/1wDJJieQC+h0zTWhdph97bd8lJkIXCHdknRCDAe8 1Tnm7oR41MUBh8M1RE6T3iB/QNLbST5w1gOB3WY0f/u+lvLaLmTiDMsqZX/1ANIoaMfL tjDwH5V8xYeiS8ZT/9D85ypQKqUD+mdSUf7Klqc9Rt7u1XEH8s+pryZZg+sHqn4KH7SX /HMzR99ZAYYzyElsjPAJocFsvQJmB5qSb9nS3U+iYfAlkGuaENUymFX9iCu5JULrjAhs x8QLlsy6uDXaep06/9TgYr7iRwPtoR0a8g8cGklgE1afCNaALgsxsw24wNATJEvVY9dK wZrQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t22si15440052ioh.58.2021.05.23.20.47.38; Sun, 23 May 2021 20:48:02 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232185AbhEXDpX (ORCPT + 99 others); Sun, 23 May 2021 23:45:23 -0400 Received: from mga18.intel.com ([134.134.136.126]:52654 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232132AbhEXDpX (ORCPT ); Sun, 23 May 2021 23:45:23 -0400 IronPort-SDR: oY4bzlUTkhEr9sL5Xha4b4s9PX4TjLd0popXdmFlO8hIQC1olqdzVZ6Ut9DkPFcjERVl1hcc/W qa2ZvhAZIUPw== X-IronPort-AV: E=McAfee;i="6200,9189,9993"; a="189231011" X-IronPort-AV: E=Sophos;i="5.82,319,1613462400"; d="scan'208";a="189231011" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2021 20:43:55 -0700 IronPort-SDR: D0SultR+b0y5j9AVbyB4E7fZhKPXBTF4lH6/zcDqzCK87sEkg/yf3bcRhNZx3/R79s0PNRWLiT U6IgGnMFqyfA== X-IronPort-AV: E=Sophos;i="5.82,319,1613462400"; d="scan'208";a="545707424" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.212.230.88]) ([10.212.230.88]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2021 20:43:55 -0700 Subject: Re: [PATCH] x86/usercopy: speed up 64-bit __clear_user() with stos{b,q} To: Samuel Neves , x86@kernel.org, linux-kernel@vger.kernel.org References: <20210523180423.108087-1-sneves@dei.uc.pt> From: Andi Kleen Message-ID: <761811e5-d693-ed33-c6ba-ce8cf2e5046c@linux.intel.com> Date: Sun, 23 May 2021 20:43:54 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: <20210523180423.108087-1-sneves@dei.uc.pt> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/23/2021 11:04 AM, Samuel Neves wrote: > The > This change is noticeable from userspace. That is in fact how I spotted it; in > a hashing benchmark that read from /dev/zero, around 10-15% of the CPU time > was spent in __clear_user. After this patch, on a Skylake CPU, these are the > before/after figures: > > $ dd if=/dev/zero of=/dev/null bs=1024k status=progress > 94402248704 bytes (94 GB, 88 GiB) copied, 6 s, 15.7 GB/s The question is of course if this actually represents any real workload. -Andi