Received: by 10.223.164.202 with SMTP id h10csp874831wrb; Thu, 9 Nov 2017 16:19:42 -0800 (PST) X-Google-Smtp-Source: ABhQp+Qp15LDMM7asdjg/IKl55AwTEbXS2p34Lucn/qwbHv93d53BwKfqNsJEP9xUiRYNIHinpTe X-Received: by 10.98.133.28 with SMTP id u28mr2213200pfd.241.1510273182224; Thu, 09 Nov 2017 16:19:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510273182; cv=none; d=google.com; s=arc-20160816; b=wbr35ohJlQoVUHcsYMxTXGe9JcR8NILdicX/K6ZOPrnU/t9e/YpDJWghtXXDuQ1SfR Gqxwn+Y2M4H+mh6utNKZUjgBT3BSJbplJUzLqPIqd4PKFm6fMcVL1BQvl5HO3OmukzDR fK3Yx+LkQrK7lcQ0EFp8jEOsIBSi7AOkeV6I0dopDZWsahMt+aLjCuEZ5lWieVh7M3qZ a2x91c/cr+uPW5St2D/oFfo/+OhCSmX7qJq0RibW49ityUjnWr7R4PpJaUcVSLdE4U/u 5cx571RANKLEC5x2bTD1fy+Ogs+udgdDJ/svDtw9j/DmecuSRp2DnD/vNjd1FSsGC1+M QCvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version:arc-authentication-results; bh=uyPnL3ZRcc8XMO2btRmt3BjZwbA55fjLMHGfT1l4IBw=; b=Zw3r2e73/3K9OYfdeerBzQyFwxRw2n/MYv7kC47SXDm6prvJnvtovRWYNfh4Fvx+p7 FnWtfOzEiHOdbq+JLVXBlG8T04omtAuDa+8n7ARBPkbXVxoY+8T7JeTEqFjt/CuEail2 /em39I6qSFrC4mO0MtS1Qb8z+D+rXSvhv5OhVzyLMriaisHy1DTuVNcHdC5/wMgc5/aR +GGkw320GsjN+QYuASQBpEaTK0J391P4ZCru6tsvBb4g4ce/2gnVIRTtSYXUIMQ2ZMyQ tT2Yk7OYeTDsxpjVh0nx01nJ/ggscAvWlhtMEli9sTxZTyVosh2oCgh4vIF/j1KoUy3S w8bQ== 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 f9si5498279pgt.614.2017.11.09.16.19.29; Thu, 09 Nov 2017 16:19:42 -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 S1755339AbdKJASu convert rfc822-to-8bit (ORCPT + 83 others); Thu, 9 Nov 2017 19:18:50 -0500 Received: from mail.fireflyinternet.com ([109.228.58.192]:60345 "EHLO fireflyinternet.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754242AbdKJASt (ORCPT ); Thu, 9 Nov 2017 19:18:49 -0500 X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from localhost (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP (TLS) id 9538241-1500050 for multiple; Fri, 10 Nov 2017 00:17:54 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT To: Frederic Weisbecker , "Ingo Molnar" From: Chris Wilson In-Reply-To: <1509414414-14987-1-git-send-email-frederic@kernel.org> Cc: "LKML" , "Byungchul Park" , "Frederic Weisbecker" , "Peter Zijlstra" , Petri Latvala References: <1509414414-14987-1-git-send-email-frederic@kernel.org> Message-ID: <151027307351.14762.4611888896020658384@mail.alporthouse.com> User-Agent: alot/0.3.6 Subject: Re: [PATCH] irq_work: Don't reinvent the wheel but use existing llist API Date: Fri, 10 Nov 2017 00:17:53 +0000 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Frederic Weisbecker (2017-10-31 01:46:54) > From: Byungchul Park > > Although llist provides proper APIs, they are not used. Make them used. > > Signed-off-by: Byungchul Park > Cc: Peter Zijlstra > Signed-off-by: Frederic Weisbecker > --- > kernel/irq_work.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/kernel/irq_work.c b/kernel/irq_work.c > index bcf107c..e2ebe8c 100644 > --- a/kernel/irq_work.c > +++ b/kernel/irq_work.c > @@ -138,11 +138,7 @@ static void irq_work_run_list(struct llist_head *list) > return; > > llnode = llist_del_all(list); > - while (llnode != NULL) { > - work = llist_entry(llnode, struct irq_work, llnode); > - > - llnode = llist_next(llnode); > - > + llist_for_each_entry(work, llnode, llnode) { > /* > * Clear the PENDING bit, after this point the @work > * can be re-used. I haven't seen this reported yet, but this requires llist_for_each_entry_safe() because as mentioned work can be linked into another cpu's runlist after the PENDING bit is cleared. -Chris From 1582737050135896659@xxx Tue Oct 31 02:07:54 +0000 2017 X-GM-THRID: 1582737050135896659 X-Gmail-Labels: Inbox,Category Forums