From owner-freebsd-threads@FreeBSD.ORG Wed Sep 24 15:19:49 2014 Return-Path: Delivered-To: freebsd-threads@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 0C5AF184; Wed, 24 Sep 2014 15:19:49 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70BEABA3; Wed, 24 Sep 2014 15:19:47 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s8OFJhur022825 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 24 Sep 2014 18:19:43 +0300 (EEST) (envelope-from kostik@tom.home) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s8OFJhur022825 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s8OFJhxq022824; Wed, 24 Sep 2014 18:19:43 +0300 (EEST) (envelope-from kostik) Date: Wed, 24 Sep 2014 18:19:43 +0300 From: Konstantin Belousov To: John Baldwin Subject: Re: sem_post() performance Message-ID: <20140924151943.GM8870@kib.kiev.ua> References: <20140921213742.GA46868@stack.nl> <20140924143104.GK8870@kib.kiev.ua> <20140924144519.GL8870@kib.kiev.ua> <8951456.0ca4t8PBR9@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8951456.0ca4t8PBR9@ralph.baldwin.cx> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=0.2 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: adrian@freebsd.org, kib@freebsd.org, freebsd-threads@freebsd.org X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Sep 2014 15:19:49 -0000 On Wed, Sep 24, 2014 at 11:04:28AM -0400, John Baldwin wrote: > On Wednesday, September 24, 2014 05:45:19 PM Konstantin Belousov wrote: > > I think it is even worse now. If the application linked against FBSD_1.0 > > (ksem) semaphores implementation runs on the modern host, it cannot > > share semaphore with modern binary. > > Correct. We changed sem_t's ABI hence the compat shims IIRC. I mean, that new and old semaphores cannot IPC. > > > Since this is not considered significant problem, we can avoid compat > > code there as well. By compat code I mean the switch on SEM_VERSION, not symversioning the libc symbols. > > I think if we leave sem_t alone there is no reason to create new compat > shims for this change, but the existing FBSD_1.0 versions have to remain for > people using old binaries, yes? Assume we applied new symver to semaphores which use new binary protocol on the existing sem_t, and, to make it reasonable, use old protocol when sem_t is accessed by older functions. Then, old binaries cannot IPC with new binaries, although both are dynamically linked to libc. IMO this is worse than the problem of different libc versions not communicating.