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=-8.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 196FBC4338F for ; Thu, 22 Jul 2021 19:14:51 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A548460E74 for ; Thu, 22 Jul 2021 19:14:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A548460E74 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:35954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m6e9h-00057C-Pz for qemu-devel@archiver.kernel.org; Thu, 22 Jul 2021 15:14:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44894) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6e92-0004Qw-2v for qemu-devel@nongnu.org; Thu, 22 Jul 2021 15:14:08 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:27571) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6e8y-0005qZ-Ke for qemu-devel@nongnu.org; Thu, 22 Jul 2021 15:14:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626981243; 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: in-reply-to:in-reply-to:references:references; bh=fV8yWUBt2e91L4121V63CnecW/BH6X+8cRzNJOlsTd4=; b=RMspv1m2f/KlTGXsCzgHfpLSlx3OBVJJxQpjfPthDWXqChx2X6Rheux+RAZ7tjfkaLj9gR TsekrMNIeQL7KdrLAUEK9CUQ+DLqUIBW4FYfHBA+GTJvS3P4U37+JAGFNu4nBGqB91KC09 ArLCJLwL7Q9ZQGWTcu8vQNEDTIq7FaM= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-578-zxWIV2u7NrGqsC3bmFwixw-1; Thu, 22 Jul 2021 15:14:02 -0400 X-MC-Unique: zxWIV2u7NrGqsC3bmFwixw-1 Received: by mail-wr1-f71.google.com with SMTP id h15-20020adffd4f0000b0290137e68ed637so2769379wrs.22 for ; Thu, 22 Jul 2021 12:14:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=fV8yWUBt2e91L4121V63CnecW/BH6X+8cRzNJOlsTd4=; b=VwiOoDWzcPqDM9fPAr07IDa7RtiMnLZ7GPwzLADs7d99BjSTL9UrVPMbWuNm5K1lfG DumJlOh7uFzg8rx1UeO6rwoOa9edKt1GNrK9p61+W3+7Iq06gB6SVHrG9m6zXrDGiiW9 eREPZB9Sy/HK1l4zSlmTh8Di8803h4r//ox8/mbNNrkEqbFZu3sD1MFTNF1XU18KGIQH +LxaC5pGMvksJh/FT2VXXHjVICZeZHyNKrzmbHsb7wvcNpkFM+Rr7O0c8qCgeGIvMKYO YL+YO80LqJxSRKlVgvWZ0Rlhqpx6w5GPIKsCtCHay5p5WMdkZk7zowD/fxR2VksaBuoH kcsw== X-Gm-Message-State: AOAM531mVZMyDh1+hr+MfXQdMf8yvhXlHrvwYxgbXcAQH0WiJYTYBC0O blcFCiZPrXd4AlD6K4uUpuk5mF4QeK1QZJ6UCWsFIEG2wYqbVkUcBLU1+JAKR97QTQnU+Jz+zQk gn6sD39aw8o9H4sM= X-Received: by 2002:adf:f404:: with SMTP id g4mr1522412wro.56.1626981240851; Thu, 22 Jul 2021 12:14:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwh0YeVYSjr1kFmedwWnu8pNb+gRIPFT+YT9Ht2dEyVO5ab68sHKNZHTstpWhW7XofAYSYNaw== X-Received: by 2002:adf:f404:: with SMTP id g4mr1522396wro.56.1626981240687; Thu, 22 Jul 2021 12:14:00 -0700 (PDT) Received: from work-vm (cpc109021-salf6-2-0-cust453.10-2.cable.virginm.net. [82.29.237.198]) by smtp.gmail.com with ESMTPSA id a64sm24792486wme.8.2021.07.22.12.13.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jul 2021 12:14:00 -0700 (PDT) Date: Thu, 22 Jul 2021 20:13:57 +0100 From: "Dr. David Alan Gilbert" To: Richard Henderson Subject: Re: Prefetches in buffer_zero_* Message-ID: References: <092f9b8b-4a14-d059-49be-010b760828aa@linaro.org> MIME-Version: 1.0 In-Reply-To: <092f9b8b-4a14-d059-49be-010b760828aa@linaro.org> User-Agent: Mutt/2.0.7 (2021-05-04) Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dgilbert@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Received-SPF: pass client-ip=170.10.133.124; envelope-from=dgilbert@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.472, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org, jmario@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" * Richard Henderson (richard.henderson@linaro.org) wrote: > On 7/22/21 12:02 AM, Dr. David Alan Gilbert wrote: > > Hi Richard, > > I think you were the last person to fiddle with the prefetching > > in buffer_zero_avx2 and friends; Joe (cc'd) wondered if explicit > > prefetching still made sense on modern CPUs, and that their hardware > > generally figures stuff out better on simple increments. > > > > What was your thinking on this, and did you actually measure > > any improvement? > > Ah, well, that was 5 years ago so I have no particular memory of this. It > wouldn't surprise me if you can't measure any improvement on modern > hardware. > > Do you now measure an improvement with the prefetches gone? Not tried, it just came from Joe's suggestion that it was generally a bad idea these days; I do remember that the behaviour of those functions is quite tricky because there performance is VERY data dependent - many VMs actually have pages that are quite dirty so you never iterate the loop, but then you hit others with big zero pages and you spend your entire life in the loop. Dave > > r~ > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK