Received: by 2002:ac8:6d01:0:b0:423:7e07:f8e4 with SMTP id o1csp6898297qtt; Mon, 18 Dec 2023 09:40:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IEGE3iwIvyW4hlJDWaRiB5Q6yTDKuOzs7vgE2dJrgsE7hr0TLGENL8/hrNZWjA1STRT4wig X-Received: by 2002:a05:6a20:160b:b0:194:58f0:5c22 with SMTP id l11-20020a056a20160b00b0019458f05c22mr2546611pzj.111.1702921247147; Mon, 18 Dec 2023 09:40:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702921247; cv=none; d=google.com; s=arc-20160816; b=RIU+tKe7rQur0PF5QV4OuWkamZF/g3z+Lki/yHz7t2CEYRGi0JOLrN3aArGSJJGRqD 5U64a0aWTwFBKQ9yq5kR5YLd5VtOjx73s8QH82U8Qt55uMCf2CirMpZxgNzBoiTE9Z8u CCyN2HHc9jUEaC3/QDziiKCghLw0HrZPylrkVwp8/5pwHUrM+ASSn3OeyywCSRJi9/VT mYPS8sz8DDspVw0Up9OK7P6+Kcs3xLL3eKmeyEIY2Z1GvgZcyIbI4KmjVOSkh2VyD+He 84Z3wDHsTQLCxNLu8UBj+0o+jn/vZeWi6gkIh1OfuK+vaZec9/vxwK9Gl3ZDV89YxX0l pd8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:feedback-id:references :in-reply-to:message-id:subject:cc:from:to:date:dkim-signature; bh=aZzxHDmfiWc7TV6vdPZR5ei+gKZrSzglYAPPwpG2IEI=; fh=7eQ4rBDZ23kTnINEoDw9u8FZlmjKkmRh7mBy2hVgr4M=; b=dwfPE+94tpLv/Ejp+qrt6Ip1OYOLYvlqL/fb6HS4uIjzr6hvNPsJ3lhz3sQVtI+VNu ivaJS8wrO0a/P1PuYNY0iJNHUsQLdb/R9sa08bmeAK4P7GIE9/vHRTXOT/MB+1621DP8 aWOwQ8cARZ/kNZAZ34569RtjC1yb2t0O+pvrsecv81X/QerBlH6zZDAUQKKmnVdncVPO BvKtYJqFA4rYMl7PJKsX7BWeODBymxmcd/KqcrKJf6dIZt3GjGKxpsACcMJ09FV5KYmo vXiQaYMpBLotRhxU+Kd7EHuXLxhG+T5YZx6dCWiPZrS0QFulNox7Of+O/8KFym6CdNcw GC3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@proton.me header.s=protonmail header.b=mJdbOJRw; spf=pass (google.com: domain of linux-kernel+bounces-4180-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4180-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=proton.me Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id by32-20020a056a0205a000b005c624c6c8c0si1516771pgb.536.2023.12.18.09.40.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 09:40:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4180-linux.lists.archive=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=@proton.me header.s=protonmail header.b=mJdbOJRw; spf=pass (google.com: domain of linux-kernel+bounces-4180-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4180-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=proton.me 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 B64BA28545C for ; Mon, 18 Dec 2023 17:39:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B9D065BFB9; Mon, 18 Dec 2023 17:39:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b="mJdbOJRw" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-4316.protonmail.ch (mail-4316.protonmail.ch [185.70.43.16]) (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 945455BF8C; Mon, 18 Dec 2023 17:39:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=proton.me DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1702921170; x=1703180370; bh=aZzxHDmfiWc7TV6vdPZR5ei+gKZrSzglYAPPwpG2IEI=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=mJdbOJRw3Y60aaMYrgEoLVwxR36O2JDxMegOU6hYci7Pxq/jjT80t0fWelfJtjQG0 Up/4KKhycafYjFXeddnugvdY0C0vWMi7nrBU9xSTfmsZ7loiIr+kwp7fDFDSUta4dx cR4hAB5YaqZOAEe/W8ynvdUitrU7D/ni2gaRpNre+1dDI4mB/jZ0VsI9ezhyG0067m 5+GuHl/qnJF+hh9otMMqIBG2VIxeFFyAOmjezLtNnnNkJvKsQlVGKy1qYYUdnPI+05 Lxnl9Cj+/3kkuWF/BL7l2S/fFZIOr6PcXWoJBe8Q/OhnankN9QKc5QxChPM78pGHML TpxfbYQWB9rPg== Date: Mon, 18 Dec 2023 17:39:14 +0000 To: Boqun Feng , Alice Ryhl From: Benno Lossin Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, Tiago Lam , Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Gary Guo , =?utf-8?Q?Bj=C3=B6rn_Roy_Baron?= , Andreas Hindborg , Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long , Martin Rodriguez Reboredo Subject: Re: [PATCH] rust: sync: Makes `CondVar::wait()` an uninterruptible wait Message-ID: In-Reply-To: References: <20231214200421.690629-1-boqun.feng@gmail.com> Feedback-ID: 71780778:user:proton Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 12/16/23 00:45, Boqun Feng wrote: > On Fri, Dec 15, 2023 at 11:27:56AM +0100, Alice Ryhl wrote: >> On Thu, Dec 14, 2023 at 9:04=E2=80=AFPM Boqun Feng wrote: >>> >>> Currently, `CondVar::wait()` is an interruptible wait, and this is >>> different than `wait_event()` in include/linux/wait.h (which is an >>> uninterruptible wait). To avoid confusion between different APIs on the >>> interruptible/uninterruptible, make `CondVar::wait()` an uninterruptibl= e >>> wait same as `wait_event()`, also rename the old `wait()` to >>> `CondVar::wait_interruptible()`. >>> >>> Spotted-by: Tiago Lam >>> Signed-off-by: Boqun Feng >> >> The diff is a bit hard to read because you swapped the order of the >> functions, but LGTM. >> >=20 > Yeah, I did that because `wait_interruptible` metioned `wait`, so I had > to make `wait` still before `wait_interruptible`. What do you mean? If you are talking about the doclink, then that should not matter. --=20 Cheers, Benno