Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2472111imm; Mon, 16 Jul 2018 08:34:09 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeomizsBcyqlXPCjjxyL7AfD203onglL+zv3mc27ss8x9wta6OUzN7udDTpbFUy6zu4jWPw X-Received: by 2002:a17:902:184:: with SMTP id b4-v6mr17366858plb.340.1531755249867; Mon, 16 Jul 2018 08:34:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531755249; cv=none; d=google.com; s=arc-20160816; b=zDTi0WXs7Q1QK/vWydRenZFSAYhoehflwy9k46Q9nJscgkpidnKqCakLEmIOl/aZBf Xxt2xqRxV9oOvwrTQUKJxmkjrUDPqrFhXOpqfoXVz9cRj2z8xF2emgDY5Ri1BcJhI2cK +bH9V51AEclxQIYBFDxxJbUyGC1f8i0WgBWOCd0nAe8awr+X7hMsYHAHyM30eeioyq50 ZazDzDzKAmaojHlBOlGWLaK7g+CyD4Y5vq3T+U0ymyr+ZiKUl8HiZImIPNmdcDtoICD/ 4i+N6i9x63kHxBNK+RlKBJdmC5EdHkKVr2T3DYGgx90iOtBzoQYnZWD/KIv+nGfqBXuF 0ygw== 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:dkim-signature:arc-authentication-results; bh=lRLm814rS6BK6gYZttBSi7auc7R6Yl4fmPi0fgnYvJ0=; b=Uuxndt5lh5sCc47aSq5ila0V+z8HsUEjZvrc6u51i0Zh9RGNuacfu5Cf/X64xP4JvJ Mk/coBWYQJQ4F/W8mz6yn+I6qFAcsWQUtMgV+bot/nMmJLUnSz3L2UfL5jUEYMrrG1dL L3GBtTvJ5XkUdddL8HWmqsKRelSLwEY2vL9psQKHgTOU49FvhBNr09+rqa4mfdXDFaje kwLW9R1LWI7n0ZWOG3hQfoN+rHB9aoILxHESyDa3cHUlfJbVR74UX9j50kX3blowe2fd P35tWHj4JoTPD5nqxIIFn2nQXHrX4NgK67Ox5MD51cY7HCSszwsWh0yE4rxXGblAmaYA gIUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mwdnkMjG; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r10-v6si28723740pgm.535.2018.07.16.08.33.55; Mon, 16 Jul 2018 08:34:09 -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; dkim=pass header.i=@kernel.org header.s=default header.b=mwdnkMjG; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731198AbeGPP7K (ORCPT + 99 others); Mon, 16 Jul 2018 11:59:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:51144 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727957AbeGPP7J (ORCPT ); Mon, 16 Jul 2018 11:59:09 -0400 Received: from localhost (LFbn-NCY-1-193-82.w83-194.abo.wanadoo.fr [83.194.41.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 14FB820647; Mon, 16 Jul 2018 15:31:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1531755073; bh=rvna0uGV6D/Y6DRIspCJFRz6t+NjNSTawLUUQRzDJbg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mwdnkMjGmWpYzGQvlnqE9KkqfLG5brAQ8krO7vUkw9jrgH1XAdw9RXjTOvCHMa0An VKne8d2uCiw4rBnLGVUHDzbHdMX7+5DcXn8qIAlDfAVlkWXucSGoXAfDMKMvL4ZoIr K637R4Q5BmLElpUjjsU/YMfsR9TGKZWYxexTfJpM= Date: Mon, 16 Jul 2018 17:31:10 +0200 From: Frederic Weisbecker To: Yury Norov Cc: Frederic Weisbecker , Ingo Molnar , Thomas Gleixner , "Goutham, Sunil" , Chris Metcalf , linux-kernel@vger.kernel.org Subject: Re: [PATCH] nohz: don't kick non-idle CPUs in tick_nohz_full_kick_cpu() Message-ID: <20180716153109.GA29270@lerouge> References: <20180712181922.23073-1-ynorov@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180712181922.23073-1-ynorov@caviumnetworks.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 12, 2018 at 09:19:22PM +0300, Yury Norov wrote: > IIUC, tick_nohz_full_kick_cpu() is intended to wakeup idle CPUs > that will not be poked by scheduler because they are actually > nohz_full. Not exactly. It is intended to trigger an interrupt on a nohz_full CPU that may be running in userspace without any tick. The irq_exit() code let us reprogramm the tick with the latest dependency updates. > > But in fact this function kicks all CPUs listed in tick_nohz_full_mask, > namely: > - idle CPUs; > - CPUs runnung normal tasks; > - CPUs running isolated tasks [1]; > > For normal tasks it introduces unneeded latency, and for isolated tasks > it's fatal because isolation gets broken and task receives SIGKILL. So this patch applies on Chris series right? For now there is no such distinction between normal and isolated tasks. Any task running in a nohz_full CPU is considered to be isolated. > The patch below makes tick_nohz_full_kick_cpu() kicking only idle CPUs. > Non-idle nohz_full CPUs will observe changed system settings just like > non-idle normal (i.e. not nohz_full) CPUs, at next reschedule. That's not exactly what we want. In fact when a task runs in a nohz_full CPU, it may not meet any reschedule interrupt for a long while. This is why we have tick_nohz_full_kick_cpu() in order to force a nohz_full CPU to see the latest changes. Thanks.