From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202502 header.b=Wmr8FqRu; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id F081E5A004E for ; Mon, 03 Feb 2025 10:25:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202502; t=1738574694; bh=KZz2HfJfM/5KpxcortIiEYac0zjst99sqmHZj10QMew=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Wmr8FqRu35bwNmlPiiOM9A/8ylfF5pKSVktGBN3jQmxsidsniPzAaMLED8vu0hLB5 6XTjso7cXvLusdzFUEyUxTORoty+bw7wyADBQN+C5SnRzhshwEoKG2JlK0Pkh1M19q FnnK+K9blbAqkY1uTMWusPYjeQQdF2Ljf8r7H4I+wCVRjy5vXC44FCQy81EryUpcbR aFvgwmz2JL88gz9KEa8OBCNikamLDxnge9bTb+0u0OQeJ9nnSQD+g7HBGwzlI8u6OV q4X8YuWVEZRb0ZlJ7CDfFeLTeWWgMpw086dkOFKfNf0TOd4hP7aJvvrXWWWsLl4eqM WCDuFxrae0DZA== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Ymh0k2ztWz4w2J; Mon, 3 Feb 2025 20:24:54 +1100 (AEDT) Date: Mon, 3 Feb 2025 19:47:41 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH v3 16/20] vhost_user: Turn vhost-user message reports to trace() Message-ID: References: <20250131193953.3034031-1-sbrivio@redhat.com> <20250131193953.3034031-17-sbrivio@redhat.com> <20250203071025.706bf40e@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="F4OJEHZY7ub2lqPW" Content-Disposition: inline In-Reply-To: <20250203071025.706bf40e@elisabeth> Message-ID-Hash: A3FVV6XWR4A245Q275WZIDPULFVTFC2I X-Message-ID-Hash: A3FVV6XWR4A245Q275WZIDPULFVTFC2I X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top, Laurent Vivier X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --F4OJEHZY7ub2lqPW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 03, 2025 at 07:10:25AM +0100, Stefano Brivio wrote: > On Mon, 3 Feb 2025 14:11:10 +1100 > David Gibson wrote: >=20 > > On Fri, Jan 31, 2025 at 08:39:49PM +0100, Stefano Brivio wrote: > > > Having every vhost-user message printed as part of debug output makes > > > debugging anything else a bit complicated. > > >=20 > > > Signed-off-by: Stefano Brivio =20 > >=20 > > I'm a little bit baffled by this. You're changing to trace() a couple > > of relatively rare messages >=20 > Well, "rare" is relative, if you're debugging state migration > transfers. :) But... Eh, I mean it's like 4ish events per migration. And they are actually related to the migration, rather than being unrelated async noise like the stuff in vu_kick_cb(). Admittedly they are pretty verbose messages. > > that I think belong in debug() category, >=20 > actually, yes, they're not so frequent. Probably we should improve on > the reporting instead, because good luck finding your little message > with transferred sizes in a rain of: >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Vhost user message =3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 > we probably need a simple facility in vhost-user code allowing to > start and continue some messages, so that if we need two lines here > for "vhost-user: req %s (%d)\nflags: ..." we can do that easily. Yeah, I'd be fine with making those vhost-user messages a little bit less individually noisy. Which presumably they were to make those stand out against the other debug messages. We perhaps don't want to get into a shouting war with ourselves. > As long as we're single-threaded, by the way, this could be simply > two calls to debug(). >=20 > > but *not* changing some things that definitely should be trace() - > > such as the ones in vu_send_single() and vu_kick_cb(). >=20 > Right, also noted for follow-ups. >=20 > > > --- > > > vhost_user.c | 12 ++++++------ > > > 1 file changed, 6 insertions(+), 6 deletions(-) > > >=20 > > > diff --git a/vhost_user.c b/vhost_user.c > > > index 2dde405..1092387 100644 > > > --- a/vhost_user.c > > > +++ b/vhost_user.c > > > @@ -640,8 +640,8 @@ static bool vu_set_vring_num_exec(struct vu_dev *= vdev, > > > unsigned int idx =3D msg->payload.state.index; > > > unsigned int num =3D msg->payload.state.num; > > > =20 > > > - debug("State.index: %u", idx); > > > - debug("State.num: %u", num); > > > + trace("State.index: %u", idx); > > > + trace("State.num: %u", num); > > > vdev->vq[idx].vring.num =3D num; > > > =20 > > > return false; > > > @@ -1176,11 +1176,11 @@ void vu_control_handler(struct vu_dev *vdev, = int fd, uint32_t events) > > > vu_sock_reset(vdev); > > > return; > > > } > > > - debug("=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Vhost user = message =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D"); > > > - debug("Request: %s (%d)", vu_request_to_string(msg.hdr.request), > > > + trace("=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Vhost user = message =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D"); > > > + trace("Request: %s (%d)", vu_request_to_string(msg.hdr.request), > > > msg.hdr.request); > > > - debug("Flags: 0x%x", msg.hdr.flags); > > > - debug("Size: %u", msg.hdr.size); > > > + trace("Flags: 0x%x", msg.hdr.flags); > > > + trace("Size: %u", msg.hdr.size); > > > =20 > > > need_reply =3D msg.hdr.flags & VHOST_USER_NEED_REPLY_MASK; >=20 --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --F4OJEHZY7ub2lqPW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmeggqwACgkQzQJF27ox 2GdggA//SMxVTvQ9XtQ2iXJpdxMtl6NIVw7rNROLA8FWrWsgbyXLWyacSn+u7th8 gy7Pr30rmpJbq1jGd1fAVpwy9iDH71UisF6lhb2Hv+RULk4Nm93W2jR0isR/35yc siXjvakVOmmgG0ihGaDmhoe0Y07V1KEvyrTJBkP+XMreea/BlJ3YyWALIgaV+GPO lJOB545W27PHZmId174Obi+74pxFlJ5h6RfGhO5I0uHq03asdWj5PIOPiSkkPpZV oHr0PU4ANVY6SIpJCT/JPqGXYW49TDo5TsWOfW4MRV7fhig8E3AXoKjC38XBq7RI Hr5hfXN1US+RS9OhjwUd0ev/H0ptjBHQSNpqPhqqM4xEE0IHIhIjnAelXOSfT7ta a6VY0Z16lOwPtZdu59rZ8j9mvkW+2HZ87nZkjOfSyqbLzYV1idbMvQhdViqo043p KYTzxjCgcArCD7MFewQBz4NzE3qDMuLDzSK+S5sRYSrFoVbo455LujTZD6636ojJ XWuRls56cVJ5otEvS2wSIeD1jv02DJ6TY0R/3lhFosZIA66SsBto26r1gZw5Db/b RTllK3i4+xQOzk3u4B7VVg+z8oe6SP5m5u7huM5cl/Wke95+zPP3iiRUo00vfroA EpZOEkavl+f8j9jurcKr3GTKVVtemxHPHoa/Tc1fTavQvvHZBiU= =xIPs -----END PGP SIGNATURE----- --F4OJEHZY7ub2lqPW--