Received: by 10.223.185.116 with SMTP id b49csp889873wrg; Fri, 16 Feb 2018 08:48:34 -0800 (PST) X-Google-Smtp-Source: AH8x224ciTU1eUVZYTC0G0/nyvqlPuLLXyQCYpVHP75phtE2JbbS4ar2zABNRCK8K7UKgArbL/FM X-Received: by 10.99.106.71 with SMTP id f68mr1986059pgc.262.1518799714472; Fri, 16 Feb 2018 08:48:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518799714; cv=none; d=google.com; s=arc-20160816; b=mixOEEOwDOsyyaEKj+M3VCjjv2PILiY9HkpZumy6Ob4KUlnWh9k/jLqSeXzU2NT9kB MkhAuy44ZDHIvHjGAIVwfRpi9Szjd2QiBkT0uRkdVXVB23/He6tOdX8uNefnXUrRIUrz lJFtI+ePo45kbNQDkVgVHr49EW4KKxwW/PgEHaXLQIVssE8lhGfW8a78pz+dgdBjpzUi TQtbQ1fzNhLiH7AvLjH9CLwlmQ3tkiAWNREb8a3aPYpjngV7WeOociz0SP+osxpJ3quA wnzQ0CWs+GddufD4uGFtmggyVL8rXoOs5tnwByI0e3iZtGM5JGrRftSz2tPQe5a+d7gd yCXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dmarc-filter:arc-authentication-results; bh=I7OQG6nRcWsT27dI4XRN+L6oKhzJr+ctS0FMgMvWVqA=; b=i4cFd5CV9GW1iFbW7TVEc4dQ09R+9+3Y21Hf1RjnvS3tpFg54q+xdY6ot+orMky2Fn X7dBlKpjHeluVeRgDjkAkUIn3S9NlPvnCeAY42IaMTQS/aeqX/w+DshisxXh3LEXYspB posxKWlGJODY0IiMKME0O1XYRzurNVycmZQyAuLO+z5nUrGjgDuuKnrvqS9wu6XYzpP6 pF0owYh0aQaVjkSrih8Ul4MMwADe9MsdzeJGR8EEf9GgZFU2YWi102z7+f9isVk8VGYK 5mhZFgGmr80FxFxAREB5OM5T43sB61hFid8tZKhNe67Y7YPfc15On/b4Q0HHxmtTCivH i54A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n10si3407427pfk.254.2018.02.16.08.48.19; Fri, 16 Feb 2018 08:48:34 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1164928AbeBOUIZ (ORCPT + 99 others); Thu, 15 Feb 2018 15:08:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:57454 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1164595AbeBOUIY (ORCPT ); Thu, 15 Feb 2018 15:08:24 -0500 Received: from gandalf.local.home (cpe-172-100-180-131.stny.res.rr.com [172.100.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DD2B5217B6; Thu, 15 Feb 2018 20:08:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DD2B5217B6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Date: Thu, 15 Feb 2018 15:08:22 -0500 From: Steven Rostedt To: Sebastian Andrzej Siewior Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, Ingo Molnar Subject: Re: [PATCH 2/2] kernel/sofirq: consolidate common code in tasklet_action() + tasklet_hi_action() Message-ID: <20180215150822.5021eb05@gandalf.local.home> In-Reply-To: <20180215172042.31573-3-bigeasy@linutronix.de> References: <20180215172042.31573-1-bigeasy@linutronix.de> <20180215172042.31573-3-bigeasy@linutronix.de> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 15 Feb 2018 18:20:42 +0100 Sebastian Andrzej Siewior wrote: > From: Ingo Molnar > > tasklet_action() + tasklet_hi_action() are almost identical. > Move the common code from both function into __tasklet_schedule_common() > and let both functions invoke it with different arguments. > > Signed-off-by: Ingo Molnar > Signed-off-by: Steven Rostedt > Signed-off-by: Thomas Gleixner > [bigeasy: splitted out from RT's "tasklet: Prevent tasklets from going > into infinite spin in RT" and added commit message] > Signed-off-by: Sebastian Andrzej Siewior > --- > kernel/softirq.c | 54 +++++++++++++++--------------------------------------- > 1 file changed, 15 insertions(+), 39 deletions(-) > > diff --git a/kernel/softirq.c b/kernel/softirq.c > index 145cf6a2e7c9..fa7ed89a9fcf 100644 > --- a/kernel/softirq.c > +++ b/kernel/softirq.c > @@ -488,14 +488,16 @@ void __tasklet_hi_schedule(struct tasklet_struct *t) > } > EXPORT_SYMBOL(__tasklet_hi_schedule); > > -static __latent_entropy void tasklet_action(struct softirq_action *a) > +static void tasklet_action_common(struct softirq_action *a, > + struct tasklet_head *tl_head, > + unsigned int softirq_nr) > { > struct tasklet_struct *list; > > local_irq_disable(); Same issues with this code. -- Steve > - list = __this_cpu_read(tasklet_vec.head); > - __this_cpu_write(tasklet_vec.head, NULL); > - __this_cpu_write(tasklet_vec.tail, this_cpu_ptr(&tasklet_vec.head)); > + list = tl_head->head; > + tl_head->head = NULL; > + tl_head->tail = &tl_head->head; > local_irq_enable(); > >