Message ID | 20201221161042.944286-5-npiggin@gmail.com |
---|---|
State | Superseded |
Headers | show
Return-Path: <skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D04HM1Vgmz9sVm for <incoming@patchwork.ozlabs.org>; Tue, 22 Dec 2020 03:12:15 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=b+QUesqx; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4D04HL6lv0zDqQ1 for <incoming@patchwork.ozlabs.org>; Tue, 22 Dec 2020 03:12:14 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::42e; helo=mail-pf1-x42e.google.com; envelope-from=npiggin@gmail.com; receiver=<UNKNOWN>) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=b+QUesqx; dkim-atps=neutral Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4D04Fy0Vr5zDqQG for <skiboot@lists.ozlabs.org>; Tue, 22 Dec 2020 03:11:01 +1100 (AEDT) Received: by mail-pf1-x42e.google.com with SMTP id t22so6715490pfl.3 for <skiboot@lists.ozlabs.org>; Mon, 21 Dec 2020 08:11:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xK48QAJysEMD7izZs+4LsmVgK9KAhq9BjwanNNrr2NI=; b=b+QUesqxVaMeat+2E6EkOpInlHErMcc+tcFyLuauwAI6lEIEfoEcc8fEtfFbmeeTqd ZL/HjVJRNjQrZ3pr5dVAz7RK2hjRHt80PV0NvZcq6Inm4OCI3TwcZn5OUEEo/gJSB2Uu SKug6I8WYt0Qpz5djjp9RaEWoRM/uqnoPyFXkLcX0TCkcrBTdssaTePgizW5jcwiISSy pycE0aIAkAxPwUlQ0s6CZfNn6SFjUCKO8n7S3E1PpBBMH9iaT2Pqi2ZK4IeFF2VAmmIz OxAWrPzACeiqs/LpDi5uC9VjaJBRpxoKAdV1ouUt/EC8qcCWm9Ec4E8AmQ3rE2IGsrsx u9Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xK48QAJysEMD7izZs+4LsmVgK9KAhq9BjwanNNrr2NI=; b=QsxO3OSjGa+TUFFUtQsUj0clrENu8hEgepxnW4Ldxfbv5PXpzD6wmYVlYBTikW/zfa BQCHUxyAvIFcJPJSfgQeOnlp2R3+65jpt3zMfkTuS3mLJ22keMrxDUmJz+8Whb8Or+wX /N7ruJUDniUiRlzTFY8NmWajILs9pU5cAVr5rrjkNJ4yJf5RlEHPiNOUmkY4mnT0a9T1 bdDvS4T6Vb5XX/RLA3bacHN2M2H/QtyybO1eWGNfOUz7gONlA8np0DRUqBs940g7Pxsl vqR/74y8RA4Lrf1HfF/bUzGd7safhoH+CW3WfTx0TmydGtkhc8kS/h6MDaSkNhVbpbIn dFWQ== X-Gm-Message-State: AOAM530lGWuqxVvJfeDWBGwnU2DVsyx4JseVzr1yxDv/OJlWveHebYVG cOI8+PnDPZzhrfBRRFytKBsKDGp5/2U= X-Google-Smtp-Source: ABdhPJyMl8ywIyLIvOIKMaJgiVIuVBpvIwDRnmr9hAYmSeOj+51Xug76lUJPVBOaNxdQio8bU+nELg== X-Received: by 2002:a62:1d0a:0:b029:1a9:8b33:a1bf with SMTP id d10-20020a621d0a0000b02901a98b33a1bfmr15984188pfd.32.1608567058717; Mon, 21 Dec 2020 08:10:58 -0800 (PST) Received: from bobo.ibm.com (193-116-97-30.tpgi.com.au. [193.116.97.30]) by smtp.gmail.com with ESMTPSA id y16sm8302359pgg.20.2020.12.21.08.10.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 08:10:58 -0800 (PST) From: Nicholas Piggin <npiggin@gmail.com> To: skiboot@lists.ozlabs.org Date: Tue, 22 Dec 2020 02:10:40 +1000 Message-Id: <20201221161042.944286-5-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20201221161042.944286-1-npiggin@gmail.com> References: <20201221161042.944286-1-npiggin@gmail.com> MIME-Version: 1.0 Subject: [Skiboot] [PATCH 4/6] core/cpu: move cpu_wake out of job_lock, only wake if necessary X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development <skiboot.lists.ozlabs.org> List-Unsubscribe: <https://lists.ozlabs.org/options/skiboot>, <mailto:skiboot-request@lists.ozlabs.org?subject=unsubscribe> List-Archive: <http://lists.ozlabs.org/pipermail/skiboot/> List-Post: <mailto:skiboot@lists.ozlabs.org> List-Help: <mailto:skiboot-request@lists.ozlabs.org?subject=help> List-Subscribe: <https://lists.ozlabs.org/listinfo/skiboot>, <mailto:skiboot-request@lists.ozlabs.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" <skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> |
Series |
idle synchronisation rewrite
|
expand
|
diff --git a/core/cpu.c b/core/cpu.c index 5505b681c..05901bf7f 100644 --- a/core/cpu.c +++ b/core/cpu.c @@ -193,8 +193,9 @@ static void queue_job_on_cpu(struct cpu_thread *cpu, struct cpu_job *job) cpu->job_has_no_return = true; else cpu->job_count++; - cpu_wake(cpu); unlock(&cpu->job_lock); + + cpu_wake(cpu); } struct cpu_job *__cpu_queue_job(struct cpu_thread *cpu,
There is no need to keep the IPI initiation under the job_lock. If the target does wake after the job is queued and before we can send the IPI, it will check for new jobs. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> --- core/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)