From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755596AbcHVOr6 (ORCPT ); Mon, 22 Aug 2016 10:47:58 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:53864 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755081AbcHVOr4 (ORCPT ); Mon, 22 Aug 2016 10:47:56 -0400 X-IBM-Helo: d03dlp01.boulder.ibm.com X-IBM-MailFrom: paulmck@linux.vnet.ibm.com Date: Mon, 22 Aug 2016 07:48:04 -0700 From: "Paul E. McKenney" To: GeHao Kang Cc: Peter Zijlstra , Chris Metcalf , =?iso-8859-1?Q?Fr=E9d=E9ric?= Weisbecker , linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@kernel.org Subject: Re: Context switch latency in tickless isolated CPU Reply-To: paulmck@linux.vnet.ibm.com References: <86f3248c-defd-f200-9eb6-bdf420771745@mellanox.com> <20160819123437.GE10121@twins.programming.kicks-ass.net> <20160821145302.GP3482@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16082214-0024-0000-0000-0000146181E7 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00005629; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000183; SDB=6.00748104; UDB=6.00353027; IPR=6.00520769; BA=6.00004672; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00012420; XFM=3.00000011; UTC=2016-08-22 14:47:54 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16082214-0025-0000-0000-000043C74452 Message-Id: <20160822144804.GB3482@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-08-22_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1608220154 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 22, 2016 at 05:40:03PM +0800, GeHao Kang wrote: > On Sun, Aug 21, 2016 at 10:53 PM, Paul E. McKenney > wrote: > > If latency is all you care about, one approach is to map the device > > registers into userspace and do the I/O without assistance from the > > kernel. > In addition to the context switch latency, local interrupts are also > closed during > user_enter and user_exit of the context tracking. Therefore, the interrupt > latency might be also increased on the isolated tickless CPU. That > will degrade the > real time performance. Are these two events determined? Hmmm... Why would you be taking interrupts on your isolated tickless CPUs? Doesn't that defeat the purpose of designating them as isolated and tickless? The key point being that effective use of NO_HZ_FULL requires careful configuration and complete understanding of your workload. And it is quite possible that you instead need to use something other than NO_HZ_FULL. If your question is instead "why must interrupts be disabled during context tracking", I must defer to people who understand the x86 entry/exit code paths better than I do. Thanx, Paul