From owner-freebsd-current@FreeBSD.ORG Thu May 22 12:18:18 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56056CA5; Thu, 22 May 2014 12:18:18 +0000 (UTC) Received: from mail-la0-x230.google.com (mail-la0-x230.google.com [IPv6:2a00:1450:4010:c03::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9E1D32BA5; Thu, 22 May 2014 12:18:17 +0000 (UTC) Received: by mail-la0-f48.google.com with SMTP id mc6so2590368lab.35 for ; Thu, 22 May 2014 05:18:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=+KJ1QlP41/mkHKucJJPDoz2yvbh+zeBuGcUlZUUhIIk=; b=ju91R/l7AV5wB/RpMXSs3rtJ1+5cI2qj0korqfhylG2BB6ngQD4PTPDVYtGM2ppPNa NJDdnQro4lq5Z3aET50OS4fIctBqzhsGlc4EhwzQhceJ1AEv+XqfowKU27fTc324Uvnn RWeZvipWGk5757z3Az+5bJ1DjRDiqK6bY+doOzlJCevEBoJ0H+ZeGSb/O35C7KK4bu2O vkND0E628w61ad6dRr9hJ6u1BpgSSFANrCKhQTBKw70qE3ctAgn1+BJvw8b4nkDkzhUT A6/qM886Syq57e09z64i+g1npsXu/mltaCf5FL0TzVlHas2BdPkrNiFzIe9lk1Td08i6 cZyw== X-Received: by 10.152.29.66 with SMTP id i2mr1064051lah.82.1400761095487; Thu, 22 May 2014 05:18:15 -0700 (PDT) Received: from dchagin.static.corbina.net (dchagin.static.corbina.ru. [78.107.232.239]) by mx.google.com with ESMTPSA id s4sm28143224las.15.2014.05.22.05.18.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 May 2014 05:18:14 -0700 (PDT) Sender: Dmitry Chagin Received: from dchagin.static.corbina.net (localhost [127.0.0.1]) by dchagin.static.corbina.net (8.14.8/8.14.8) with ESMTP id s4MCICUF001155; Thu, 22 May 2014 16:18:12 +0400 (MSK) (envelope-from dchagin@dchagin.static.corbina.net) Received: (from dchagin@localhost) by dchagin.static.corbina.net (8.14.8/8.14.8/Submit) id s4MCIChN001154; Thu, 22 May 2014 16:18:12 +0400 (MSK) (envelope-from dchagin) Date: Thu, 22 May 2014 16:18:12 +0400 From: Chagin Dmitry To: Hans Petter Selasky Subject: Re: Patch for Linux Futexes Message-ID: <20140522121812.GA1070@dchagin.static.corbina.net> References: <537DDA2E.6030609@selasky.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sdtB3X0nJg68CQEu" Content-Disposition: inline In-Reply-To: <537DDA2E.6030609@selasky.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-multimedia@FreeBSD.org, FreeBSD Current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2014 12:18:18 -0000 --sdtB3X0nJg68CQEu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 22, 2014 at 01:06:22PM +0200, Hans Petter Selasky wrote: > Hi, >=20 > When using the Linux Skype client under FreeBSD I sometimes see that the= =20 > Audio disappears in the one direction. When I check "ps auxw" I see=20 > skype is stuck on a so-called Futex. I looked into the Linux futex code= =20 > and see that wakeup_one() is used instead of wakeup(). Maybe others can= =20 > test too and verify if replacing wakeup_one() by wakeup() makes any=20 > difference in for Linux applications using Futexes. >=20 is it fixes the problem for you? as the author of it I should to look back to find the reason of using wakeup_one(). and check this patch on nptl tests. > --HPS >=20 >=20 > > diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_fu= tex.c > > index 9b4c92f..e893bf4 100644 > > --- a/sys/compat/linux/linux_futex.c > > +++ b/sys/compat/linux/linux_futex.c > > @@ -498,7 +498,7 @@ futex_wake(struct futex *f, int n, uint32_t bitset) > > wp->wp_flags |=3D FUTEX_WP_REMOVED; > > TAILQ_REMOVE(&f->f_waiting_proc, wp, wp_list); > > LIN_SDT_PROBE1(futex, futex_wake, wakeup, wp); > > - wakeup_one(wp); > > + wakeup(wp); > > if (++count =3D=3D n) > > break; > > } > > @@ -525,7 +525,7 @@ futex_requeue(struct futex *f, int n, struct futex = *f2, int n2) > > wp->wp_flags |=3D FUTEX_WP_REMOVED; > > TAILQ_REMOVE(&f->f_waiting_proc, wp, wp_list); > > LIN_SDT_PROBE1(futex, futex_requeue, wakeup, wp); > > - wakeup_one(wp); > > + wakeup(wp); > > } else { > > LIN_SDT_PROBE3(futex, futex_requeue, requeue, > > f->f_uaddr, wp, f2->f_uaddr); >=20 > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" --=20 Have fun! chd --sdtB3X0nJg68CQEu Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlN96wQACgkQ0t2Tb3OO/O3TgQCdGJCLWmUgIkbY4yvNkbT2UTVW 2cUAn1uvx6ebL3IUh8MYpBR1i/7FV693 =eHJL -----END PGP SIGNATURE----- --sdtB3X0nJg68CQEu--