Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1200285ybi; Thu, 30 May 2019 13:17:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqyo8kf2pl6K67ArWOpMzyN3hBR3c/6vqadFyVq7k3/RHKFpG+je1PJZj7CIOWxBNHdzBBpG X-Received: by 2002:a17:90b:d8c:: with SMTP id bg12mr5253600pjb.70.1559247440178; Thu, 30 May 2019 13:17:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559247440; cv=none; d=google.com; s=arc-20160816; b=dwAElKGHHh4oH25XBJ4q4cbML8Ar16N+hEtNnf45AcHWCQi3Gi5POX8ugqKJOYBzob hnKvb/o+jHyjuJTRYjya3BuAKaHD17y+jDbgjfGMWHBNMVuwqwK0prd4I2wqd8x/SiIM dZTiXFCuXPuaCxAtITIcbF0ThZDyUj9RqceZeowLW8okzeuYOJfJH6/vp+lY3Sx9oOIT nlwhZJp9iX7+ieKB1zrBM90pmuOZ20C8+/K5gTrAXAyuG0BkPOgYl7oXogxYfsrOFjj+ yRKeHISx66YvD8xsDKgEutm3e6Jp441RIT8ot2+3Zgupt4b2QH5Hd0pyNi4APgPQLTw6 7B6Q== 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; bh=F1i/PA9uLYd0xl41ygBnJjN9/QQol+qaOt/o2zq1PYI=; b=mKZr1Ih0OdLa7Oo6rwVD1TMzfWjAi9bnx6tJ0Dyc8YMgwJyBUzwGqfQxLRaKU7+S6q n29cEJihdguDiijsCAENFdD/T9nEcHEUaRVwGlOC4jqFyuXIRz/ZXpUMC8QDS4C7MRbg fSZEHlh2TLMqFbcAz4Al9nvVBQVbnSUyP+YI13VmFo35q9RDnfRE4nnQgRzs4mIiR/Ib 9VqCgh7N8iJ6xDvXu/yGL2x6A8Zm4OKbU4Fm7pT1nx1w26DnIqzl15lehu+ks4SJNJGj cHmaUYOiZA5CT6JvpdA+CrJrG9wk+d6LAb4+nW40h5kxZoa31NN/AoAOUat7Wmuevbbs /QIQ== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cj16si3933589plb.239.2019.05.30.13.17.03; Thu, 30 May 2019 13:17:20 -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; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726649AbfE3UPq (ORCPT + 99 others); Thu, 30 May 2019 16:15:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52542 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726080AbfE3UPp (ORCPT ); Thu, 30 May 2019 16:15:45 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 07732307CB5F; Thu, 30 May 2019 20:15:45 +0000 (UTC) Received: from amt.cnet (ovpn-112-13.gru2.redhat.com [10.97.112.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id CE6215C324; Thu, 30 May 2019 20:15:42 +0000 (UTC) Received: from amt.cnet (localhost [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id E520610519B; Thu, 30 May 2019 16:38:16 -0300 (BRT) Received: (from marcelo@localhost) by amt.cnet (8.14.7/8.14.7/Submit) id x4UJc9Jp027708; Thu, 30 May 2019 16:38:09 -0300 Date: Thu, 30 May 2019 16:38:08 -0300 From: Marcelo Tosatti To: Anna-Maria Gleixner Cc: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org, Thomas Gleixner , Daniel Bristot de Oliveira , Luiz Capitulino , Haris Okanovic Subject: Re: [patch 0/3] do not raise timer softirq unconditionally (spinlockless version) Message-ID: <20190530193806.GB23199@amt.cnet> References: <20190415201213.600254019@amt.cnet> 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-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Thu, 30 May 2019 20:15:45 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 29, 2019 at 04:52:37PM +0200, Anna-Maria Gleixner wrote: > Hi, > > I had a look at the queue and have several questions about your > implementation. > > First of all, I had some troubles to understand your commit messages. So I > first had to read the code and then tried to understand the commit > messages. It is easier, if it works the other way round. Right. Commit message seemed descriptive to me, but i should probably try to improve the explanation in the commit message. > On Mon, 15 Apr 2019, Marcelo Tosatti wrote: > > > For isolated CPUs, we'd like to skip awakening ktimersoftd > > (the switch to and then back from ktimersoftd takes 10us in > > virtualized environments, in addition to other OS overhead, > > which exceeds telco requirements for packet forwarding for > > 5G) from the sched tick. > > You would like to prevent raising the timer softirq in general from the > sched tick for isolated CPUs? Or you would like to prevent raising the > timer softirq if no pending timer is available? With DPDK and CPU isolation, there are no low resolution timers running on the isolated CPUs. So prevent raising timer softirq if no pending timer is available is enough. > Nevertheless, this change is not PREEMPT_RT specific. It is a NOHZ > dependand change. So it would be nice, if the queue is against > mainline. But please correct me, if I'm wrong. Since it was based on the idea of https://lore.kernel.org/patchwork/patch/446045/ Which was an -RT patch, i decided to submit it against the -RT kernel. But it can be merged through the mainline kernel queue as well, i believe. > [...] > > > This patchset reduces cyclictest latency from 25us to 14us > > on my testbox. > > > > A lot of information is missing: How does your environment looks like for > this test, what is your workload,...? x86 hardware, with KVM virtualized, running -RT kernel on both host and guest. Relevant host kernel command line: isolcpus=1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,14 intel_pstate=disable nosoftlockup nohz=on nohz_full=1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,14 rcu_nocbs=1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,14 Relevant guest kernel command line: isolcpus=1 nosoftlockup nohz=on nohz_full=1 rcu_nocbs=1 And workload in question is cyclictest (the production software is DPDK, but cyclictest is used to gather latency data). > Did you also run other tests? Yes, have a custom module stress test to attempt to hit the race. Daniel (CC'ed) ran it under a kernel with debugging enabled, with no apparent problems. So one downside of this patch is that raises the softirq unnecessarily sometimes. However, its impact is reduced to isolated CPUs.