From patchwork Tue Feb 6 18:49:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 197608 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1754061dyb; Tue, 6 Feb 2024 11:03:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IFQHIgIxWvGrtZhAZQs33WzArD5KyBC/KbCjdOK8lQfPgdViLs/IWTqJystfKsHAhCfZaz1 X-Received: by 2002:a17:902:d4c1:b0:1d7:2e86:fb2a with SMTP id o1-20020a170902d4c100b001d72e86fb2amr2769145plg.65.1707246188771; Tue, 06 Feb 2024 11:03:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707246188; cv=pass; d=google.com; s=arc-20160816; b=nBfc4sOXq40qrkKnXeJ572i2Yzby5bGFaO+I4zpysk19dUMRQsiPjWrI7rX/fNmruj 92bDDfe4lmB1cyWA8t2choiQ0PMNlocpoJI6p3lOuiJxNVxlfp6Ax+F0K1BrDDmQj6or YRV3AVI/39lMH9X0Uy6msxOrGl/V9HjThP3RbNYt9eCiejtlMnJWA1/lxCLrA6Z/ofCc 2A2t7Nx8ah6EEmjGWQqZKJEirnBuxNBULDaZ1Gm5z1UQWzLdONt3lkmQqAM4mfgliWhV MlVdq1r5uqF2a4EsFwdj7NbL7V0siX7E3INce7I6AkqvqqtEArFYBIPZCz/cNPs14GjY JTHQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:subject:cc:to:from:date:user-agent:message-id :dkim-signature; bh=Ra7EGxeWV8AGneO4cyp0zFD1CrKmCahpgLqv1cR4INo=; fh=S5pK+IFXb9KWWJgt1GmmpnukymGtwWq8gVNDoEMMZns=; b=BFlBuoGZ6PjQ3Sn7g29teKSgKHvrZ2Yd+3Cg6uDn+8tNeYu6PpaQzMkQI/2i4KRAvo yxZDCpxZAPbjNbDAdA0+92T/81fzsRtWUlfrOnPE6loHDv0GNRPDInAtsegM9DzmmZmf N4o6VDUZqHLQ6oZyKD0PJbkfnguejPDzXRp0DkeHZAEWBYQ6b5kqXZ2sEzddzvO43QAX GhHJOE40Bjnxw0UJYtl1UuJthQ+u53oSWTIQAAsNMBtJhmYUjUwIyNjy2Vgvwu83XvHY lEX5tqX/uI2rpP2/SXY2tZjWjo9MfvC9bU7JUQmNGyRy8QL6fBkVfeno6J0Lfftfc2Rc tXcg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Tii4fEL6; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-55520-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55520-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Forwarded-Encrypted: i=1; AJvYcCXuKX/d1STQ17T5LpterVIZuIrA2DibVsKdz0aneohBVWcBw3DR8g8BoPq6/53JEC3bsBJKhu2at8WcjOg5loO167YVog== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 21-20020a170902e9d500b001d4e7ad3810si2043169plk.604.2024.02.06.11.03.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 11:03:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55520-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Tii4fEL6; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-55520-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55520-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 547E32926E4 for ; Tue, 6 Feb 2024 19:02:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 865121BF54; Tue, 6 Feb 2024 19:00:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Tii4fEL6" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6086C13AF0 for ; Tue, 6 Feb 2024 19:00:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707246035; cv=none; b=ATIGXjB59qklynLx61vZGzmr2C0xq8zwKj1/Te+iiyHixB36p7qkOw+90j23xETxHlLzSNtn1CHBKxNoqZMBMGtuKp11MmAjbVuImeiIWIa7EF5ZHil7w+7nz+2NvGRYd427Hkkx4VZYZpBv5sS0V6YN6O/kLoajw0qBKuAPkEg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707246035; c=relaxed/simple; bh=BYgVLfv6v/ttWx32QuJAxOjLWrclNlzBJvovbd6xDjw=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=XcoQstIpi4mpYM40W8c68ZyQ9EWZ0udyaQ4l4B/JahHafX11cb1s3fE5rH4DP3/Cz6Wf4IlVA7FEikHwO5/cBcF9r5Mf7HPeGpbhDkvowza/+S7CQsYgCtRUhgUKEX+/RDDBaF4xn3RqSjN3hjtn60L9qBHLDBng5skISEwZdrQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Tii4fEL6; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707246030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=Ra7EGxeWV8AGneO4cyp0zFD1CrKmCahpgLqv1cR4INo=; b=Tii4fEL6HSrqbjLiWgNqB/TZEV5g56FfItQFZ2eaBFJ/q0ZK9DW8ekXUPcuyC60X79Tg0Y lQbJrvawTXHVq6NGrFAGvShmTH+gSb2NZEPyzvEouUrzS/6lsFPRLzz9K7MEdGcC0NKWu0 w4DT2MRQzkGofzUbgfnFVFIho+iDCks= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-54-dMpKcn1bNXyBXxUWz-pMEA-1; Tue, 06 Feb 2024 14:00:26 -0500 X-MC-Unique: dMpKcn1bNXyBXxUWz-pMEA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5D0933CBDF69; Tue, 6 Feb 2024 19:00:25 +0000 (UTC) Received: from tpad.localdomain (unknown [10.96.133.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1DE8F492BC7; Tue, 6 Feb 2024 19:00:25 +0000 (UTC) Received: by tpad.localdomain (Postfix, from userid 1000) id 25B48401E119E; Tue, 6 Feb 2024 15:58:07 -0300 (-03) Message-ID: <20240206185709.928420669@redhat.com> User-Agent: quilt/0.67 Date: Tue, 06 Feb 2024 15:49:15 -0300 From: Marcelo Tosatti To: linux-kernel@vger.kernel.org Cc: Daniel Bristot de Oliveira , Juri Lelli , Valentin Schneider , Frederic Weisbecker , Leonardo Bras , Peter Zijlstra , Thomas Gleixner , Marcelo Tosatti Subject: [patch 04/12] clockevent unbind: use smp_call_func_single_fail References: <20240206184911.248214633@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790177379646603918 X-GMAIL-MSGID: 1790177379646603918 Convert clockevents_unbind from smp_call_function_single to smp_call_func_single_fail, which will fail in case the target CPU is tagged as block interference CPU. Signed-off-by: Marcelo Tosatti Signed-off-by: Marcelo Tosatti Index: linux-isolation/kernel/time/clockevents.c =================================================================== --- linux-isolation.orig/kernel/time/clockevents.c +++ linux-isolation/kernel/time/clockevents.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "tick-internal.h" @@ -416,9 +417,14 @@ static void __clockevents_unbind(void *a */ static int clockevents_unbind(struct clock_event_device *ced, int cpu) { + int ret, idx; struct ce_unbind cu = { .ce = ced, .res = -ENODEV }; - smp_call_function_single(cpu, __clockevents_unbind, &cu, 1); + idx = block_interf_srcu_read_lock(); + ret = smp_call_function_single_fail(cpu, __clockevents_unbind, &cu, 1); + block_interf_srcu_read_unlock(idx); + if (ret) + return ret; return cu.res; }