From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD5ACC4332F for ; Thu, 22 Dec 2022 15:28:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235500AbiLVP2J (ORCPT ); Thu, 22 Dec 2022 10:28:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235516AbiLVP2F (ORCPT ); Thu, 22 Dec 2022 10:28:05 -0500 Received: from smtpout.efficios.com (unknown [IPv6:2607:5300:203:b2ee::31e5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2B026166; Thu, 22 Dec 2022 07:28:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1671722883; bh=rpA44R7emjI1qfvYw5PNQuISdxrQHVVRQfHfzR8tV+I=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=XtKGHoWZPqL/uWvKgIGwBbfsliUlaqCaZKBwUAxvR4ETlyzVenEeU/R1uNZNpBii9 qt0qqcVZsOeeaSdvOvPyz/sBdsp/7umSMIt0ngwu3st2G9kyg/Xm9LKSH8bZet40Pv /9GendsgWKLq86hoZTOuRbByW239ktBrf80ho4iYrxX3jf1PrgMd7lMdmpHrbjkLfx wP/sVDAqtdNvYXXCIUWwSH6hzO0FadaI4sia24RPwdy5dx2fF9m1rwF8lZqszlnI9l Xg3eiak7cAuhU2rwV/r0UCJlork92zX9rbBwLPyq4qkTsoOG1tkNI10+d6X0wY/vCM LcR+N0DOyvc3Q== Received: from [10.1.0.30] (192-222-188-97.qc.cable.ebox.net [192.222.188.97]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4NdDhz57syzc1J; Thu, 22 Dec 2022 10:28:03 -0500 (EST) Message-ID: <9fad5641-ebd4-d2e5-6f87-2c409c336072@efficios.com> Date: Thu, 22 Dec 2022 10:28:28 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH 0/2] sched/membarrier, selftests: Introduce MEMBARRIER_CMD_GET_REGISTRATIONS Content-Language: en-US To: Michal Clapinski , "Paul E. McKenney" , Peter Zijlstra Cc: Ingo Molnar , Andrei Vagin , Shuah Khan , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org References: <20221207164338.1535591-1-mclapinski@google.com> From: Mathieu Desnoyers In-Reply-To: <20221207164338.1535591-1-mclapinski@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org On 2022-12-07 11:43, Michal Clapinski wrote: > This change provides a method to query previously issued registrations. > It's needed for CRIU (checkpoint/restore in userspace). Before this > change we had to issue private membarrier commands during checkpoint - > if they succeeded, they must have been registered. Unfortunately global > membarrier succeeds even on unregistered processes, so there was no way to > tell if MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED had been issued or not. > > CRIU is run after the process has been frozen with ptrace, so we don't > have to worry too much about the result of running this command in parallel > with registration commands. Peter, Paul, I'm OK with the proposed changes. Should we route this through sched/core from the tip tree ? For both patches: Acked-by: Mathieu Desnoyers Thanks, Mathieu > > Michal Clapinski (2): > sched/membarrier: Introduce MEMBARRIER_CMD_GET_REGISTRATIONS > selftests/membarrier: Test MEMBARRIER_CMD_GET_REGISTRATIONS > > include/uapi/linux/membarrier.h | 4 ++ > kernel/sched/membarrier.c | 39 ++++++++++++++++++- > .../membarrier/membarrier_test_impl.h | 33 ++++++++++++++++ > .../membarrier/membarrier_test_multi_thread.c | 2 +- > .../membarrier_test_single_thread.c | 6 ++- > 5 files changed, 81 insertions(+), 3 deletions(-) > -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com