Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp290414ybf; Wed, 26 Feb 2020 13:12:42 -0800 (PST) X-Google-Smtp-Source: APXvYqwbfvMkP5LuuxvwYz9zUXSb+1KP74n/f0mfEwjh3ssrRaDbWT2ToS/utgHDYbuPvWhub2cJ X-Received: by 2002:a9d:5a09:: with SMTP id v9mr607779oth.214.1582751561890; Wed, 26 Feb 2020 13:12:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582751561; cv=none; d=google.com; s=arc-20160816; b=0k+2vfFaEhXsDkmKYA+G6X2kkaxaZrUyRl+AcECDMxMAdSsRMZ9Wu5mpojS31b2iWI jDVv6fWnCD1kr6+A9xyy3hDXTa9WGdch3FYw8Cb9GWluKW5y/jhiADuIyl2xXhc+uNF7 xwkBylx8t4MGfPrv1919PE88USFsZ6jLRrxCJ2pSu/GC5ImNrfOycZhUxfA3mFqpuc1k Qe0lNWXbUTfHiqQUcXrAAB/nwjcPU4njKRTBaTg3nfbTW36fbqAJe+83WlL/I8YEZeiJ i65WBKm5nK4yIIpN79ErrqTwb5B9MA6x8SDgkuKoyy68UOcTz7kB2q8IcKCKah59k+Tt 3qzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=U/X5c41CWOqsaozN/wVnUKtcCB3SyjYHUZOYEhI6v44=; b=iE5aN7bT4LS43ysrErr47MqvyUk7IgjjZwQRABl7wzDh4heghspzP7bjDjcdEBda6s ndKMrj3tA0fwOPs7smQqhkBmuhKB4ERs+/4S6TNSRKIZIVFbQRpRZHM5pJ+AHrn4AD3n rbIhGj0Bhf4E9dNeCXtuSxIJ1Uow/t0xGsaqAD33fzbD3eqFbLvyW+KPRCoGqJ/K9OhN L9CmU4hF4wkcMPqO5R8DAjRRuR1zE0xhahVJabhr/RTbomQa8M7skezZqOj8lxNs5Sff Yv9C7crrtrMRWwV9RleAhdOoUR2BTYirSYLB7q9WFNBb3k8WH/5Yy2dtpVMlufMVfso8 jk6Q== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h2si211872oie.151.2020.02.26.13.12.26; Wed, 26 Feb 2020 13:12:41 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727503AbgBZVKl (ORCPT + 99 others); Wed, 26 Feb 2020 16:10:41 -0500 Received: from mga07.intel.com ([134.134.136.100]:58591 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727486AbgBZVKl (ORCPT ); Wed, 26 Feb 2020 16:10:41 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Feb 2020 13:10:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,489,1574150400"; d="scan'208";a="261201001" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.21]) by fmsmga004.fm.intel.com with ESMTP; 26 Feb 2020 13:10:40 -0800 Received: by tassilo.localdomain (Postfix, from userid 1000) id 0D1513011A5; Wed, 26 Feb 2020 13:10:40 -0800 (PST) Date: Wed, 26 Feb 2020 13:10:40 -0800 From: Andi Kleen To: Kyung Min Park Cc: x86@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, gregkh@linuxfoundation.org, tony.luck@intel.com, ashok.raj@intel.com, ravi.v.shankar@intel.com, fenghua.yu@intel.com Subject: Re: [PATCH 2/2] x86/asm/delay: Introduce TPAUSE delay Message-ID: <20200226211040.GS160988@tassilo.jf.intel.com> References: <1582744258-42744-1-git-send-email-kyung.min.park@intel.com> <1582744258-42744-3-git-send-email-kyung.min.park@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1582744258-42744-3-git-send-email-kyung.min.park@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 26, 2020 at 11:10:58AM -0800, Kyung Min Park wrote: > TPAUSE instructs the processor to enter an implementation-dependent > optimized state. The instruction execution wakes up when the time-stamp > counter reaches or exceeds the implicit EDX:EAX 64-bit input value. > The instruction execution also wakes up due to the expiration of > the operating system time-limit or by an external interrupt This is actually a behavior change. Today's udelay() will continue after processing the interrupt. Your patches don't I don't think it's a problem though. The interrupt will cause a long enough delay that exceed any reasonable udelay() requirements. There would be a difference if someone did really long udelay()s, much longer than typical interrupts, in this case you might end up with a truncated udelay, but such long udelays are not something that we would encourage. I don't think you need to change anything in the code, but should probably document this behavior. -Andi