From patchwork Fri Jan 17 14:47:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11339389 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 760421820 for ; Fri, 17 Jan 2020 14:48:43 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 51D172073A for ; Fri, 17 Jan 2020 14:48:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="TKE9HIzK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 51D172073A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=eu.citrix.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1isSuV-0003UW-Vz; Fri, 17 Jan 2020 14:47:43 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1isSuU-0003U8-Oy for xen-devel@lists.xenproject.org; Fri, 17 Jan 2020 14:47:42 +0000 X-Inumbo-ID: 4b703c8c-3938-11ea-9fd7-bc764e2007e4 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 4b703c8c-3938-11ea-9fd7-bc764e2007e4; Fri, 17 Jan 2020 14:47:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1579272455; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=MuZOZ0sS2G2mGEuT1Z5jFZxPYJJsKyOfLSzMGJZQ0aE=; b=TKE9HIzKHCkERQfjiwx1pmCSFCtqUWrNO2EgArSNxz9ElEjbSveHEfsd /HiIv2ggHFd/blkvwfzth40Rv+AnQfcYJ7E5j1rVXmKv5rLrT7EXFSYzM iHP/xzJmhAWddH91TkMfbrJaYYa9vUEWsYHBdhR/b2zNsMeoNP/l9upK8 g=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=ian.jackson@eu.citrix.com; spf=Pass smtp.mailfrom=Ian.Jackson@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of ian.jackson@eu.citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="ian.jackson@eu.citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa2.hc3370-68.iphmx.com: domain of Ian.Jackson@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="Ian.Jackson@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: EHvub2B18WFoq/Q6/DEp1hKaQpQtx2QImZWBEXKPhbEBO2ejKCBSxRENO2qo64oDeNQ0TaUL55 xWE4DZ4a7we8byjb2J6HF0CJZGXJaWmZJ2gw4N9edNj7aDdAyUl7bH84LGKrnQnsFJ2LBdj3am OT/r0InZDsI+2Lbl1NRXgLfBg9cMM4fa513TkXx0Hl7imGVFou4jtsyhXT+dMUmvE2hYtStrFT eCyM7bhIn7CUvuMwjKR21D7B10W6mS1KE8hKR2VAo297r4344q3g0fPNfrzaqbLSjsJZvcqk6T BSg= X-SBRS: 2.7 X-MesageID: 11089537 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,330,1574139600"; d="scan'208";a="11089537" From: Ian Jackson To: Date: Fri, 17 Jan 2020 14:47:17 +0000 Message-ID: <20200117144726.582-2-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200117144726.582-1-ian.jackson@eu.citrix.com> References: <20200117144726.582-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v3 01/10] libxl: event: Rename poller.fds_changed to .fds_deregistered X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Anthony PERARD , Ian Jackson , George Dunlap , Wei Liu Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" This is only for deregistration. We are going to add another variable for new events, with different semantics, and this overly-general name will become confusing. Signed-off-by: Ian Jackson Reviewed-by: George Dunlap Tested-by: George Dunlap --- tools/libxl/libxl_event.c | 8 ++++---- tools/libxl/libxl_internal.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/libxl/libxl_event.c b/tools/libxl/libxl_event.c index aa8b7d1945..1210c1bfb3 100644 --- a/tools/libxl/libxl_event.c +++ b/tools/libxl/libxl_event.c @@ -239,7 +239,7 @@ void libxl__ev_fd_deregister(libxl__gc *gc, libxl__ev_fd *ev) ev->fd = -1; LIBXL_LIST_FOREACH(poller, &CTX->pollers_fds_changed, fds_changed_entry) - poller->fds_changed = 1; + poller->fds_deregistered = 1; out: CTX_UNLOCK; @@ -1120,7 +1120,7 @@ static int beforepoll_internal(libxl__gc *gc, libxl__poller *poller, *nfds_io = used; - poller->fds_changed = 0; + poller->fds_deregistered = 0; libxl__ev_time *etime = LIBXL_TAILQ_FIRST(&CTX->etimes); if (etime) { @@ -1186,7 +1186,7 @@ static int afterpoll_check_fd(libxl__poller *poller, /* again, stale slot entry */ continue; - assert(poller->fds_changed || !(fds[slot].revents & POLLNVAL)); + assert(poller->fds_deregistered || !(fds[slot].revents & POLLNVAL)); /* we mask in case requested events have changed */ int slot_revents = fds[slot].revents & events; @@ -1626,7 +1626,7 @@ int libxl__poller_init(libxl__gc *gc, libxl__poller *p) int rc; p->fd_polls = 0; p->fd_rindices = 0; - p->fds_changed = 0; + p->fds_deregistered = 0; rc = libxl__pipe_nonblock(CTX, p->wakeup_pipe); if (rc) goto out; diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index ba8c9b41ab..c5b71d15f0 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -629,14 +629,14 @@ struct libxl__poller { /* * We also use the poller to record whether any fds have been * deregistered since we entered poll. Each poller which is not - * idle is on the list pollers_fds_changed. fds_changed is + * idle is on the list pollers_fds_changed. fds_deregistered is * cleared by beforepoll, and tested by afterpoll. Whenever an fd - * event is deregistered, we set the fds_changed of all non-idle + * event is deregistered, we set the fds_deregistered of all non-idle * pollers. So afterpoll can tell whether any POLLNVAL is * plausibly due to an fd being closed and reopened. */ LIBXL_LIST_ENTRY(libxl__poller) fds_changed_entry; - bool fds_changed; + bool fds_deregistered; }; struct libxl__gc {