From patchwork Wed Dec 11 11:12:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hillf Danton X-Patchwork-Id: 11284755 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AF050112B for ; Wed, 11 Dec 2019 11:12:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9388A214AF for ; Wed, 11 Dec 2019 11:12:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9388A214AF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id EC9BF6B319E; Wed, 11 Dec 2019 06:12:57 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id E79B56B319F; Wed, 11 Dec 2019 06:12:57 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D90BE6B31A0; Wed, 11 Dec 2019 06:12:57 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0002.hostedemail.com [216.40.44.2]) by kanga.kvack.org (Postfix) with ESMTP id C51016B319E for ; Wed, 11 Dec 2019 06:12:57 -0500 (EST) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 3AD8A180AD820 for ; Wed, 11 Dec 2019 11:12:57 +0000 (UTC) X-FDA: 76252598394.04.wool33_70db34911c707 X-Spam-Summary: 2,0,0,6d12cdb5b8f5bea0,d41d8cd98f00b204,hdanton@sina.com,:linux-kernel@vger.kernel.org::hdanton@sina.com,RULES_HIT:41:355:379:800:960:973:988:989:1260:1311:1314:1345:1359:1437:1515:1534:1539:1568:1711:1714:1730:1747:1777:1792:2393:2559:2562:2693:3138:3139:3140:3141:3142:3865:3871:5007:6119:6120:6261:7903:9707:10004:11026:11334:11473:11537:11658:11914:12043:12297:12438:13069:13311:13357:13894:14181:14384:14721:21080:21627:21740:21966:30054,0,RBL:202.108.3.167:@sina.com:.lbl8.mailshell.net-62.50.2.100 64.100.201.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:28,LUA_SUMMARY:none X-HE-Tag: wool33_70db34911c707 X-Filterd-Recvd-Size: 1552 Received: from mail3-167.sinamail.sina.com.cn (mail3-167.sinamail.sina.com.cn [202.108.3.167]) by imf01.hostedemail.com (Postfix) with SMTP for ; Wed, 11 Dec 2019 11:12:55 +0000 (UTC) Received: from unknown (HELO localhost.localdomain)([221.219.0.244]) by sina.com with ESMTP id 5DF0CF330001B1D9; Wed, 11 Dec 2019 19:12:52 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com X-SMAIL-MID: 924905629342 From: Hillf Danton To: linux-kernel Cc: linux-mm , Hillf Danton Subject: [RFC 2/4] workqueue: use smp_processor_id() on queuing work Date: Wed, 11 Dec 2019 19:12:41 +0800 Message-Id: <20191211111241.25000-1-hdanton@sina.com> In-Reply-To: <20191211104601.16468-1-hdanton@sina.com> References: MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.213778, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Use the regular version with irq disabled. Signed-off-by: Hillf Danton --- c/kernel/workqueue.c +++ d/kernel/workqueue.c @@ -1415,11 +1415,11 @@ retry: /* pwq which will be used unless @work is executing elsewhere */ if (wq->flags & WQ_UNBOUND) { if (req_cpu == WORK_CPU_UNBOUND) - cpu = wq_select_unbound_cpu(raw_smp_processor_id()); + cpu = wq_select_unbound_cpu(smp_processor_id()); pwq = unbound_pwq_by_node(wq, cpu_to_node(cpu)); } else { if (req_cpu == WORK_CPU_UNBOUND) - cpu = raw_smp_processor_id(); + cpu = smp_processor_id(); pwq = per_cpu_ptr(wq->cpu_pwqs, cpu); }