Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp832842imb; Fri, 1 Mar 2019 15:44:33 -0800 (PST) X-Google-Smtp-Source: APXvYqzQJD6NMiCdYM4dx0LqrAj+jXSjOpFnTWw5WJSdu+Th8rVJis3Z978VmSV32enml23OUfiQ X-Received: by 2002:a65:510c:: with SMTP id f12mr7654551pgq.40.1551483873826; Fri, 01 Mar 2019 15:44:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551483873; cv=none; d=google.com; s=arc-20160816; b=OY6gTkbiZK7MDOsRABT2/sLarrKPdiCtFzooY8I/FxBq8w3HylgxhG9T5ntpe6tzt6 7P0tRWvbqgZxoO5cjVJ+imYdcUb0Br5BgiuVT8U/Srt2i/7hfz62duIGfyHXht8E/YbT r4TMjkYneGnnldmRFkxlJ3MYNx3nAdYckEOdZqab2lKvZllfbjHT8RGC7MfNlDvmIDeq BMobHIpFXwEIhHionai4rg9qthVkjUyX2k/ul4FgHSdYLxNf+JuMDxOCE1fD+PVLrHvc geJTIjNyatOtne51IF1aQZ7khfeepNCmstARySsPQ/iRybzYHw6Bbziw6SCh5MQqRELC rJdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=vpCXpj9IY6W5+IypI4LBcBGzOlnLf4nzSemvDu/SPL0=; b=gqGN34WFw8tRF79Bd2Gss8+pNwMAIHnpZktpyji0AN83HcXzMreoKApZuNwVjT4KNP 7gNybw7ra0q+QVaeqY4kHFN0UT73PuxNIoyapiH1zs5DG1edeoNYiiIgjbiWvdDH4LRF hRDlEofQGwA6dPTL/tDQzSuj2x29bMB7oqaFOeQ1z1F1kAOTrGnr0kbIpLvTjpuIuq5/ fUzYhWcHTQHb19d2nvPbpo91MhMdNKTv2iAEqivIrX764+KBD/SLQXeaq6A8zWr+zAPz 8bqKRbCK9PhL72Sepmtb6ubobBe1qKcRuf6texR5VoyL0TAynwvMamhOBa0Rsayrrxgo OGig== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l94si22572659plb.209.2019.03.01.15.44.13; Fri, 01 Mar 2019 15:44:33 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726437AbfCAXnw (ORCPT + 99 others); Fri, 1 Mar 2019 18:43:52 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:34839 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbfCAXnw (ORCPT ); Fri, 1 Mar 2019 18:43:52 -0500 Received: from p5492e5b8.dip0.t-ipconnect.de ([84.146.229.184] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1gzroi-0007wi-0G; Sat, 02 Mar 2019 00:43:48 +0100 Date: Sat, 2 Mar 2019 00:43:47 +0100 (CET) From: Thomas Gleixner To: Dongli Zhang cc: xen-devel@lists.xenproject.org, stable@vger.kernel.org, linux-kernel@vger.kernel.org, boris.ostrovsky@oracle.com, sstabellini@kernel.org, jgross@suse.com, joe.jin@oracle.com, Herbert Van Den Bergh , sboyd@kernel.org, john.stultz@linaro.org Subject: Re: [BUG linux-4.9.x] xen hotplug cpu leads to 100% steal usage In-Reply-To: <841bb9a9-1cba-483f-a353-1209684f7c74@default> Message-ID: References: <841bb9a9-1cba-483f-a353-1209684f7c74@default> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 28 Feb 2019, Dongli Zhang wrote: > > The root cause is that the return type of jiffies_to_usecs() is 'unsigned int', > but not 'unsigned long'. As a result, the leading 32 bits are discarded. Errm. No. The root cause is that jiffies_to_usecs() is used for that in the first place. The function has been that way forever and all usage sites (except a broken dev_debug print in infiniband) feed delta values. Yes, it could have documentation.... > jiffies_to_usecs() is indirectly triggered by cputime_to_nsecs() at line 264. > If guest is already up for long time, the initial steal time for new vcpu might > be large and the leading 32 bits of jiffies_to_usecs() would be discarded. > So far, I have two solutions: > > 1. Change the return type from 'unsigned int' to 'unsigned long' as in above > link and I am afraid it would bring side effect. The return type in latest > mainline kernel is still 'unsigned int'. Changing it to unsigned long would just solve the issue for 64bit. Thanks, tglx