Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp40588imm; Tue, 16 Oct 2018 17:29:19 -0700 (PDT) X-Google-Smtp-Source: ACcGV629tEhJqyCAa82PfqNQJ+wE7xq104vvN7UNbVu/fFy8GOf2jyRAJZ1A8MTSt3Rz3Ymg3bXF X-Received: by 2002:a65:5a89:: with SMTP id c9-v6mr21734041pgt.216.1539736159647; Tue, 16 Oct 2018 17:29:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539736159; cv=none; d=google.com; s=arc-20160816; b=056AH86vBY66jOB79OYEf8wD7jNZ3g487tDPM8RnPkVe/tIitq5PwAPViQJoaudJLy 4H+18qpuDqm9+q0UP1hapB6CeOOT7ij9QtHI5BLaZc5OoXDzyJ93yGiM5M8UvvHVkJ7u X8O0OJNS3dgimdO/yysowpgtu4yTl3O1Zu7Udj+Tlt8yscK/PPBSgEOSOyyNXVGhc89B vLDGKZwlV48hjs8rnKbZqrwJKDhOE8aVoJoSc24kBOz/ZNjIK/j9SBu1nl0e3BFrbIIq 2XMhU99gsceI5rbyX0uxVlM1BlOCm992eYfp1grbHboUWBMJpjTUmFz4S7cIuQl6qvKc kF6g== 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; bh=X9EyON2pqs834DAHwg1BxUida7HiBAHM0kZ8S3CS+5U=; b=eZDY6in3OO8XH/827DpLiRKv15p9Rx5MN4p9eqLSjlY5WTDsiVoWqjOf1d7VIOTirT rPlmAJsWUEnB0XDz4XFjvwNMqgrT/0p4WL529MrOn2xYwrzjyFWYvrvXrnzds1eyqxCW nk5gSyFSLHFx7iJF2tpisZUy1NqUAlYlt3Y/sqkUs+ycpWUrN2Ar/ulLhtNSZiDLGgqs l8hxA2Q7f/icoHpEQUziZ30KHQN3NFAuQm3zDYXwvI+y0gKnrTh9nPMM98cJwA4tOTn6 5dtBM5HJ2Z9zTvh46PKUwUdFdCHXOJEJUJO0uH3saVpXLOIi9uGcHORJqLF75NYx49al 5TvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rGy1Obor; 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 9-v6si16516113plf.345.2018.10.16.17.29.02; Tue, 16 Oct 2018 17:29:19 -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=rGy1Obor; 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 S1727516AbeJQITF (ORCPT + 99 others); Wed, 17 Oct 2018 04:19:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:60110 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727217AbeJQITF (ORCPT ); Wed, 17 Oct 2018 04:19:05 -0400 Received: from localhost (LFbn-NCY-1-241-207.w83-194.abo.wanadoo.fr [83.194.85.207]) (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 58F582148C; Wed, 17 Oct 2018 00:26:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539735964; bh=FduHjmQooEV2vCqYnmR6Cl+aw9zw6SLSs+5137FFO7k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rGy1OborMMG7YGQZFqereRTPe8r+PJ7NpkJLMAJgVNc2rgyj/ex5omfGxrPjX6CT8 8+7EDuHzhi8CE+US06dnt5eFBOJNPIrllv1n2E0H/G2QFt/aoCWBbBDIALn/1Y/pdk rBl5rsXXnaQs2dfUZahe5lDRhSpJVzZWHCaMXGyw= Date: Wed, 17 Oct 2018 02:26:02 +0200 From: Frederic Weisbecker To: Pavan Kondeti Cc: LKML , Frederic Weisbecker , Sebastian Andrzej Siewior , Peter Zijlstra , "David S . Miller" , Linus Torvalds , Thomas Gleixner , "Paul E . McKenney" , Ingo Molnar , Mauro Carvalho Chehab Subject: Re: [RFC PATCH 29/30] softirq: Make softirq processing softinterruptible Message-ID: <20181017002601.GB12996@lenoir> References: <1539213137-13953-1-git-send-email-frederic@kernel.org> <1539213137-13953-30-git-send-email-frederic@kernel.org> <20181016041552.GA27587@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181016041552.GA27587@codeaurora.org> 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 Hi Pavan, On Tue, Oct 16, 2018 at 09:45:52AM +0530, Pavan Kondeti wrote: > Hi Frederic, > > On Thu, Oct 11, 2018 at 01:12:16AM +0200, Frederic Weisbecker wrote: > > From: Frederic Weisbecker > > > > Make do_softirq() re-entrant and allow a vector, being either processed > > or disabled, to be interrupted by another vector. This way a vector > > won't be able to monopolize the CPU for a long while at the expense of > > the others that may rely on some predictable latency, especially on > > softirq disabled sections that used to disable all vectors. > > > I understand that a long running softirq can be preempted/interrupted by > other softirqs which is not possible today. I have few questions on your > patches. > > (1) When softirq processing is pushed to ksoftirqd, then the long running > softirq can still block other softirqs (not in SOFTIRQ_NOW_MASK) for a while. > correct? No, Ksoftirqd is treated the same as IRQ tail processing here: a vector can interrupt another. So for example, a NET_RX softirq running in Ksoftirqd can be interrupted by a TIMER softirq running in hardirq tail. > > (2) When softirqs processing happens asynchronously, a particular softirq > like TASKLET can keep interrupting an already running softirq like TIMER/NET_RX, > correct? In worse case scenario, a long running softirq like NET_RX interrupt > a TIMER softirq. But I guess this is something expected with this. i.e > each softirq is independent and whichever comes recent gets to interrupt the > previously running softirqs. Exactly, and that's inherent with interrupts in general. The only way to work around that is to thread each vector independantly but that's a whole different dimension :-) Thanks!