Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2323494pxa; Mon, 24 Aug 2020 10:55:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6Y2NTv4hweTNFfQf7Yil513oyNGV/JrJ+ZHJOgWvsjgb/4TRFPFbnDgYfyJsB3F0Jlb6J X-Received: by 2002:aa7:d7d7:: with SMTP id e23mr6292225eds.347.1598291709647; Mon, 24 Aug 2020 10:55:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598291709; cv=none; d=google.com; s=arc-20160816; b=rDfqvd40V6ArIYl6p9IZYMSIMgsEtG0t7LlUO0ugAhkzRYGSUWbuJor3hf9xkoNoTV +vsWDjycVOZ9cOTMKG6gqyRJJIDV++F2dRYsqup3sSUfSptXUKj5hU/oha7ofgFAXzpS CgXKYvp6e8dg6OqI9VV2xzEYt9/Dhhu0+5YzLu9AuMlY6T9u5boPjMMI647BSZ1XU3EQ NQPdUaJkkF/W9DEscQH2YW2ff1TkhA8seo1TnQjp+UVXnnFVqUN/WRiwMCj/rBXF2jSH tM118D+EkeVhCRC+x4yL8mrwYDpFQBFPLFKRhumMAjwfMAJgmelBcvL82kftZ+oXlHYP cl1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-transfer-encoding :content-id:mime-version:subject:cc:to:references:in-reply-to:from :organization:dkim-signature; bh=Ef4R5O5Cq7LZWsF/vmaYxvTJ7WpiMWWuCBWCNUUsdH0=; b=wA1nvqwyBYIVuO5JY7gPa+jiRjbWmhHbWjpl22MctApY7ofWIGv8ZCF69Du4gQTIQN oI1d+Lb6lUxwtTHDXxKjk4U7s2o5sZslNTCAdq9fGKEN+SP7UmddyR32jrpksOSogLe6 gf4DiIQG9DBmAZszbrDFiCXVI8STxQuXXnTIiXVDGKUVYXYYOisghMj3eAligtL+GqLS fCasz8KT/Bia2pbBOEmi62v1Bvd7e47Wg3k194p14GQPhOe3Q4UkUy+wmTilzdE9vVdS FmsFnrLxrgV6qAytAFRLhimPw1PDIq2hWivsXT6b3ybBnMsB+Xk0h38Q9kU0O46aWUhs v/UQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=exZhBBQu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id el3si4159048ejc.295.2020.08.24.10.54.46; Mon, 24 Aug 2020 10:55:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=exZhBBQu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726303AbgHXRyL (ORCPT + 99 others); Mon, 24 Aug 2020 13:54:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:23312 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbgHXRyI (ORCPT ); Mon, 24 Aug 2020 13:54:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598291647; 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; bh=Ef4R5O5Cq7LZWsF/vmaYxvTJ7WpiMWWuCBWCNUUsdH0=; b=exZhBBQuH9czr5ZykM5TicEW1la/JGCjJMdSCqwioNW1GANGdIudoNWGM8jMWxnVx5SqAf U/Y5Sh+XN+gsFvPcVEeaxQofNPBKoZnmChihu8pfhPsjcq84GJcIxmAKRVc9TsZEA/S4RT YSJHA/JVNU/xbfl60M3zMNPIP8E6Lqw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-415-VqlurWbUNcmfBK7sxFhF-Q-1; Mon, 24 Aug 2020 13:54:05 -0400 X-MC-Unique: VqlurWbUNcmfBK7sxFhF-Q-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D02EA101963C; Mon, 24 Aug 2020 17:54:03 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-120-127.rdu2.redhat.com [10.10.120.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2BD2360BF1; Mon, 24 Aug 2020 17:54:02 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20200824165802.GB408760@erythro.dev.benboeckel.internal> References: <20200824165802.GB408760@erythro.dev.benboeckel.internal> <20200807160531.GA1345000@erythro.dev.benboeckel.internal> <159681277616.35436.11229310534842613599.stgit@warthog.procyon.org.uk> <329586.1598282852@warthog.procyon.org.uk> To: me@benboeckel.net Cc: dhowells@redhat.com, mtk.manpages@gmail.com, torvalds@linux-foundation.org, keyrings@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-man@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] Add a manpage for watch_queue(7) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <348447.1598291641.1@warthog.procyon.org.uk> Content-Transfer-Encoding: quoted-printable Date: Mon, 24 Aug 2020 18:54:01 +0100 Message-ID: <348448.1598291641@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ben Boeckel wrote: > > One loss message. I set a flag on the last slot in the pipe ring to s= ay that > > message loss occurred, but there's insufficient space to store a count= er > > without making the slot larger (and I really don't want to do that). > > = > > Note that every slot in the pipe ring has such a flag, so you could, > > theoretically, get a loss message after every normal message that you = read > > out. > = > Ah, so a "you lost something" is just a flag on the next event that does > make it into the queue? I read it as a whole message existed indicating > that data was lost. Not sure of the best wording here. No. That flag is internal. It causes read() to fabricate a message and insert it into the user buffer after the flagged message has been copied o= ver. > > bit 0 is 2^0 in this case. I'm not sure how better to describe it. > = > OK, so the bits are in native-endian order in the enclosing bytes. But C > just doesn't have a set ABI for bitfields (AFAIK), so I guess it's > "whatever GCC does" in practice? Hard to say - powerpc and s390 have bit 0 as the MSB:-/ But "& (1 << 0)" gets you 2^0, whatever the CPU book says. David