From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 8 15:36:21 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8DAE4FE0; Tue, 8 Jan 2013 15:36:21 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) by mx1.freebsd.org (Postfix) with ESMTP id 0B34691B; Tue, 8 Jan 2013 15:36:20 +0000 (UTC) Received: by mail-wg0-f53.google.com with SMTP id fn15so447887wgb.32 for ; Tue, 08 Jan 2013 07:36:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=gqw0wQPDG25BJu20R+zHVjftfEUjp012YazSg+GYnC4=; b=gd4jw7GnJV32XqI2SubaOqPaIq+K9029bw8UMUXksKR4GdsNfVYRoIIWzPRkpL5sBZ 10Z9OP89XVpJfGzFoBmhaaMGINfolo5ZfBnmzXkOQxLxfGzMMrl2mNtwf2ESTXIFn7wk rNOf+BmXAspjrcd/8c3c9qM71XJORQuXumhcvqE8HIQ6TcIeiVFO3Vf2FN40AYtvcSst 2PLhdxaATa0m1T0SovLorVj19IvSuTitKiNiTpq3r1eGnNQaRL8H43f8Q1Jfvlq83wtm y/oGTB/zmM+bExLLmB+vYieXt5zflnOxjEHbbHiqFiy7Rpg31pP+0qn4STfUV1lgvH6J kXhA== MIME-Version: 1.0 Received: by 10.194.179.34 with SMTP id dd2mr102364088wjc.1.1357659373410; Tue, 08 Jan 2013 07:36:13 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.217.57.9 with HTTP; Tue, 8 Jan 2013 07:36:13 -0800 (PST) In-Reply-To: <1357626412.6752.24.camel@localhost.localdomain> References: <1357608470.6752.22.camel@localhost.localdomain> <1357626412.6752.24.camel@localhost.localdomain> Date: Tue, 8 Jan 2013 07:36:13 -0800 X-Google-Sender-Auth: rD8mBdZ6JeH24qlUt_Brx15mWmo Message-ID: Subject: Re: Is it possible to block pending queued RealTime signals (AIO originating)? From: Adrian Chadd To: Richard Sharpe Content-Type: text/plain; charset=ISO-8859-1 Cc: Daniel Eischen , freebsd-hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2013 15:36:21 -0000 .. or you could abstract it out a bit and use freebsd's aio_waitcomplete() or kqueue aio notification. It'll then behave much saner. adrian On 7 January 2013 22:26, Richard Sharpe wrote: > On Mon, 2013-01-07 at 22:24 -0500, Daniel Eischen wrote: >> On Mon, 7 Jan 2013, Richard Sharpe wrote: >> >> > Hi folks, >> > >> > I am running into a problem with AIO in Samba 3.6.x under FreeBSD 8.0 >> > and I want to check if the assumptions made by the original coder are >> > correct. >> > >> > Essentially, the code queues a number of AIO requests (up to 100) and >> > specifies an RT signal to be sent upon completion with siginfo_t. >> > >> > These are placed into an array. >> > >> > The code assumes that when handling one of these signals, if it has >> > already received N such siginfo_t structures, it can BLOCK further >> > instances of the signal while these structures are drained by the main >> > code in Samba. >> > >> > However, my debugging suggests that if a bunch of signals have already >> > been queued, you cannot block those undelivered but already queued >> > signals. >> > >> > I am certain that they are all being delivered to the main thread and >> > that they keep coming despite the code trying to stop them at 64 (they >> > get all the way up to the 100 that were queued.) >> > >> > Can someone confirm whether I have this correct or not? >> >> If true, could they not use sigwaitinfo() from a separate >> thread instead and just bypass having to use a signal >> handler altogether? That thread can either call sigwaitinfo() >> when it is ready to receive more signals, or block on a >> semaphore/CV/whatever while events are being processed. > > So, I guess that what I want is something that will continue to work for > both Linux and FreeBSD with minimal code divergence ... > > I guess I need to write a simpler program to check what the deal is. > > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"