Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754868AbeAOIxN (ORCPT + 1 other); Mon, 15 Jan 2018 03:53:13 -0500 Received: from verein.lst.de ([213.95.11.211]:39455 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754504AbeAOIxL (ORCPT ); Mon, 15 Jan 2018 03:53:11 -0500 Date: Mon, 15 Jan 2018 09:53:10 +0100 From: Christoph Hellwig To: Jeff Moyer Cc: Christoph Hellwig , viro@zeniv.linux.org.uk, Avi Kivity , linux-aio@kvack.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 32/32] aio: implement io_pgetevents Message-ID: <20180115085310.GB32532@lst.de> References: <20180110155853.32348-1-hch@lst.de> <20180110155853.32348-33-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Fri, Jan 12, 2018 at 03:44:52PM -0500, Jeff Moyer wrote: > Christoph Hellwig writes: > > > This is the io_getevents equivalent of ppoll/pselect and allows to > > properly mix signals and aio completions (especially with IOCB_CMD_POLL) > > and atomically executes the following sequence: > > > > sigset_t origmask; > > > > pthread_sigmask(SIG_SETMASK, &sigmask, &origmask); > > ret = io_getevents(ctx, min_nr, nr, events, timeout); > > pthread_sigmask(SIG_SETMASK, &origmask, NULL); > > > > Note that unlike many other signal related calls we do not pass a sigmask > > size, as that would get us to 7 arguments, which aren't easily supported > > by the syscall infrastructure. It seems a lot less painful to just add a > > new syscall variant in the unlikely case we're going to increase the > > sigset size. > > pselect, as an example, crams the sigmask and size together. Why not > just do that? libaio can take care of setting that up. Yes, I could try that. It's just another double indirection for no good reason.