From nobody Wed Nov 27 15:33:29 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xz3PT1s66z5fMpT; Wed, 27 Nov 2024 15:33:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xz3PT1Lv3z4hdR; Wed, 27 Nov 2024 15:33:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732721613; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=QDG+SRGl8EQTb2GDUvd3K5TWpm4582BLdyxjiZy5C98=; b=Neq0NUoDdR4qgE2mRyhOMzYXYGNql+/aXJVVKLJoh9tjVQhpoF30+NbepYVTLng3QOOuwR sdwSzs9kgzWyYJ2wo7qmoj3abQNkiCEYdB5L1EsWNWtzZqhcqskb1NeRkdypSjjJsWrFAu hT/ioN+bzDLwMMQxphiGzB9xhy8wqnQLWF48O9V7G+tfTx8g/d/MoupBoCWlYnMlwa909g E1Mtwp6n+nIeewAktAiSffV114TKE0wSq5+bvW7UK98Xtw7GNi/8fR2qmArOsLXA6JuPzQ XkOwCYarNi1S12S1tX5T/IYsAjyfRBNfrj4fWNDL3DytFnB/r5+HLDuM2O6WAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732721613; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=QDG+SRGl8EQTb2GDUvd3K5TWpm4582BLdyxjiZy5C98=; b=H9sYjGuFT6LPrLpxgIYfb9SScfOlhwQO0DmkxH16i4JwUMB+qAmcWSis/OYiIO5/jIQ8pW fVPe3WSSs0dPPmd0Jm+K8DgSfPVw8EWuaLgIjJ42OysaRd7YpRsVU40xB21fMYl3pVPIb5 EZB/cz+IS+u2gcw8pgB28y4U1nE5kTKgW4MJS76cvJJnAMUfuoZ/xsi+ELXC7avBggs6P2 OPIpiO60Ko4xf+0tmqsFK4wp7O4gue8pWRYUYCch6jNHiPHbv1l3oX3talk/tHKjvE4AkM y/9WqRN+JtxBkWROa8X134e6kb2ptpryDqh1sqW/OwvPJ9pX/fUCsNIovG1FGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732721613; a=rsa-sha256; cv=none; b=VPiwzP4e6/zSKU3qxppYJ/aNtqIby2IvbzwNaniRY+EZvAMJacE++FVtByAN2feFXews/5 k+e7uMEwYfjp69Com0AGC83dYtFQi1EI+WHWVOMVTl7EBafYRqys5fOqr0GJd8YAe1wWhv Qc7VApeziRF00P5KjwcZdwcigb3dBfw/NpYruUcz0BemkABGkq6PXv7OKe109pLMhnUhgS CNz2hFoJ8YXtC5L9Wg5vF5BsLiOnRaK6yDLPr4Ti8w+i7W5A7IAuiZMijJQpAY0EllWmE8 NWIx7ivHlrAQTXYNsXxWjHsirifbWsTsTVC3dZxt9wYH2OI6WyZyJDcSxOmCCg== Received: from [192.168.0.88] (unknown [93.188.39.137]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: avg/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Xz3PS2tLzzH9f; Wed, 27 Nov 2024 15:33:32 +0000 (UTC) (envelope-from avg@FreeBSD.org) Message-ID: Date: Wed, 27 Nov 2024 17:33:29 +0200 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 5317480967bf - main - sound: Remove CHN_F_SLEEPING To: John Baldwin , Christos Margiolis Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202411261448.4AQEmw7Y084208@gitrepo.freebsd.org> <77c4113c-c023-4db3-826a-83be4e9baa42@FreeBSD.org> <4234bd4a-29a0-4f95-bebb-d745c101cd25@FreeBSD.org> Content-Language: en-US From: Andriy Gapon Autocrypt: addr=avg@FreeBSD.org; keydata= xsDNBGcKrHEBDADRvwQOK0b/yo4ys5cs6bOQMhEh4xtfbaZ/CU00cpPgUip3sOZCdrtMWlRC g25z97prxE9pKueZi+HXDhIPpa9xl14ghqF4oYScuJ1i18HyiOH2y5Q3Vv/TtFiSzicd3EAu QgS3jVidpgDSPDdj2Yz3UxYpZ+PuFl6nOnvCvqOFcjUlzKCyPaiN2b86l1Nscmhnc+zQ/faB erUOEFEDQbWMA5YfXi8HrbeR16hfRfGt7E0aMDlIj9FIPIq71UWMN9CimPgs4+rbNr1MAlLa z4GxSDhVYZEY5rqtCzr+PLXboRQWnaUwXl0/biw9enf17NHdYv1SNAFTX2eC4dZ3qBVI74dS PgNprm+PMfz+6Hhs/dAv+Nan5nVhg3EFIjYTiy0MnjMSq8uI0v0ykpAGAcJJ5xl6d23aLxgN 6f0z6pJRCO0hGPgU7UzvFD0MxJxmbzqdT1R51KDan1oD41b+tjl2LMB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Fb4HP6N+B+4N1y1OwULousfl7JRoYxA4MRL ls7E2sSoJvrEBTJB3Pc34xu8rsJ1A5V3NgN6djX8yEZYpTRkcmrBeWy/ofDqZPVqneAx0LRm eldDS9msXDW4KXODyPZ+9unvmHAcoH0xaBYaSH44CDZDQDg4LNcmbOvuu1TEXBJhjQARAQAB wsD8BBgBCAAmFiEEmXvSmjiQFHPVOpLnzDOt5NLj67sFAmcKrHMFCQeEzgACGwwACgkQzDOt 5NLj67sUCAv5AXqgWnYN9EblapMbZjkiqL8pZQ0GNqh+Pg9FwbyULxjtRTO6rD4D0IxizByb ef+neeUNyYlagt5nfKMysEr0SU/gHKCi8vyTF/63ukMrGUNGmJJxrndl5ZYKC6j6eX7twrZF L1Uvlmn6FnQ22red5kHO93fDjG4zaDIZvHfwj7kzjZ4tpC7Byinf88s14mdZeScc0PnU2hj4 UGYju/wg2FF4YxaZYhcmdTiRYY0Wx85XSMZv19pnn78sadEuRvfRd4JTmw++j1xGXeqQGWzz /CTG5/Ex9GAkQ02hZbmi236byDXoet4G8TEyOph9QFVkV9bNd0jQZaFZPGEj4PSPUYGAF7s5 xJaNGgctC3aZ7WjEv1FBoo44XCU4xcjJ1wZQUrHxRhx6TW0Jtcl0U9qfKFW30TSPo6RyiXuj X4ltWKAtjoXB8nUmEJckaz7IRu2b4pXDeazZuz5JBygUs10yJjDxh2vFQZo0KaBAPx9MZlPn gpPTjT15L8xGftEjQXF6 In-Reply-To: <4234bd4a-29a0-4f95-bebb-d745c101cd25@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 27/11/2024 17:12, John Baldwin wrote: > On 11/26/24 12:17, Christos Margiolis wrote: >> John Baldwin wrote: >>> I'm not super excited about reading cv_waiters directly.  Generally speaking >>> 'struct cv' is opaque to the rest of the kernel.  Maybe add a little inline >>> routine or macro cv_waiters() that returns this value instead?  Then it can >>> be documented in condvar.9 along with the caveats about when it is safe to >>> use. >> >> I see we already have cv_wmesg() in sys/sys/condvar.h to access >> cv_description. Maybe we could add a cv_waiters() macro in there as >> well? > > Yes, that is where I would add it. Perhaps, cv_waiters should be left as an implementation detail and an explicit counter should be added in the sound driver code as a replacement for CHN_F_SLEEPING flag? And for pre-existing checks of cv_waiters too. That sounds a bit redundant but all code that needs to check if something is waiting does it that way. cv_waiters is accessed only in kern_condvar.c, naturally, and in the sound driver. -- Andriy Gapon