Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4340210yba; Tue, 7 May 2019 16:46:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqzVxL6KoAfH79MvWnwuINPpTTJo7klDpwbfInvl4zocc9IgRvFUX2FnRl/hTjzzAYwLHf7+ X-Received: by 2002:a17:902:1024:: with SMTP id b33mr42529654pla.46.1557272774895; Tue, 07 May 2019 16:46:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557272774; cv=none; d=google.com; s=arc-20160816; b=tEH7lXj472uYzkc5hIYgZBvPXCCOctmx12ecBv9KIkNQbkjUB1iyvgY/TCXM8kJVJY NyrMj3cySgzsCx8rxZfI9eaa6yNXMCDN2s8iSL+2rN32OQhFZwtFG0756bkvtXMau/JV pXoqqqtvZiZvLZfAER2binC28IpEn0lroNXoy624ANhIFUXBMKa4h7J4WK91uz71tnLZ pmB8OTjbcRjM6bPtqknGyJa6xnUp6L+uElzObTQ5lN2AJZVWsTzZ4+0bpZjbseCDNbIz /hlaH8zZRpKrWeFye9V5twW2/NiLcQnzlWEVlyX+M24JzjdGVfqOHyBIn7gzgKBESfG6 ZlyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=3pxoypNah93k7+cS/SabzQDYmJdGx/8Ae1r/vNi3WaU=; b=nD0RJ7wTB+vLNdpdo8AVuCGjAr+b0zHusSMhYrXRe/MNaU+lD+HQ0x/ukEVVHzhlfw 1sqYMqM4gjPlKR7d5u0isXsIq8g8xSeH8S1cHo+9Z5XF6XUQ0oycXcVGRWCFx7QeEv4b J5k9CzUbSkAAHTMyAeEwm9QYFC5E6Ue4BCYuIQpFm/4YsqiHKtuozP+3C24kr3970zzc 0Tl33++d0Cp2PqD448HmIE9vvnpZb7oxcfZ7caQM9WYvRjdwbw5V04OyxD6gegK7/G+G ZY7x5IJLuD5Tx9xC0oWQw6ktiOp1fAGrbp+26rkdE3omz2Lz+hiA2huzNg+rC4kypFzw qKrA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s61si21783743plb.313.2019.05.07.16.45.58; Tue, 07 May 2019 16:46:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726404AbfEGXpJ (ORCPT + 99 others); Tue, 7 May 2019 19:45:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58426 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726091AbfEGXpJ (ORCPT ); Tue, 7 May 2019 19:45:09 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E966F8764B; Tue, 7 May 2019 23:45:08 +0000 (UTC) Received: from amt.cnet (ovpn-112-2.gru2.redhat.com [10.97.112.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id E05921001E99; Tue, 7 May 2019 23:45:04 +0000 (UTC) Received: from amt.cnet (localhost [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id 5A2AA10517B; Tue, 7 May 2019 20:44:49 -0300 (BRT) Received: (from marcelo@localhost) by amt.cnet (8.14.7/8.14.7/Submit) id x47Nij80006291; Tue, 7 May 2019 20:44:45 -0300 Date: Tue, 7 May 2019 20:44:45 -0300 From: Marcelo Tosatti To: Peter Zijlstra Cc: kvm-devel , linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Andrea Arcangeli , Bandan Das , Paolo Bonzini Subject: Re: [PATCH] sched: introduce configurable delay before entering idle Message-ID: <20190507234445.GA6185@amt.cnet> References: <20190507185647.GA29409@amt.cnet> <20190507221519.GE2677@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190507221519.GE2677@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 07 May 2019 23:45:09 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 08, 2019 at 12:15:19AM +0200, Peter Zijlstra wrote: > On Tue, May 07, 2019 at 03:56:49PM -0300, Marcelo Tosatti wrote: > > > > Certain workloads perform poorly on KVM compared to baremetal > > due to baremetal's ability to perform mwait on NEED_RESCHED > > bit of task flags (therefore skipping the IPI). > > > > This patch introduces a configurable busy-wait delay before entering the > > architecture delay routine, allowing wakeup IPIs to be skipped > > (if the IPI happens in that window). > > > > The real-life workload which this patch improves performance > > is SAP HANA (by 5-10%) (for which case setting idle_spin to 30 > > is sufficient). > > > > This patch improves the attached server.py and client.py example > > as follows: > > > > Host: 31.814230202231556 > > Guest: 38.17718765199993 (83 %) > > Guest, idle_spin=50us: 33.317709898000004 (95 %) > > Guest, idle_spin=220us: 32.27826551499999 (98 %) > > > > Signed-off-by: Marcelo Tosatti > > Thanks for the CC.. > > NAK, this is something that should live in a virt idle governor or > something along those lines. Ok, makes sense, will rework the patch!