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=-5.2 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS, URIBL_BLOCKED,USER_AGENT_MUTT 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 84C46C004C9 for ; Tue, 7 May 2019 22:15:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 52FFD21019 for ; Tue, 7 May 2019 22:15:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="m3D0K/UL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726486AbfEGWPZ (ORCPT ); Tue, 7 May 2019 18:15:25 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:58226 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725843AbfEGWPZ (ORCPT ); Tue, 7 May 2019 18:15:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=6yspUXhtCc5m+Xrh7rQU5TbEjYHPNSoicVC5+DlX5Cg=; b=m3D0K/ULVXwGwo+zbxza8nByV HEf9WGJHMR4KTMjQTaF4YfKpdbjDL16lsK5XZhKzB0WCtGd9/hvNet8KhuMG5dtPP/hGFjQq8PEby b4H0zX+lTirtYPemlhvHOie8qZHguV24Smx844h0RQU+dh3Tc0toxCgkdL72+gzBHoTL9W3CB8CAy MsieQdnQlttpH2w50kyEKWRqn6tOo9k+jlnxtS1taPyD7L9Og59DXvQ0iGT/6xmRTPvHkp6J+BrqA FhHCFP5Crf4RpoZREsp7s/GhTeMRy5UvKBTzvxMEWXBNpf0+CmbOBoEvjS45JclARZ0DiWx0klnzV 7kBy1cQxQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hO8Mr-0005to-EI; Tue, 07 May 2019 22:15:21 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id B87C920D0941D; Wed, 8 May 2019 00:15:19 +0200 (CEST) Date: Wed, 8 May 2019 00:15:19 +0200 From: Peter Zijlstra To: Marcelo Tosatti 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: <20190507221519.GE2677@hirez.programming.kicks-ass.net> References: <20190507185647.GA29409@amt.cnet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190507185647.GA29409@amt.cnet> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.