From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L9klw-0004fh-BK for qemu-devel@nongnu.org; Mon, 08 Dec 2008 13:23:56 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L9klo-0004cf-Af for qemu-devel@nongnu.org; Mon, 08 Dec 2008 13:23:55 -0500 Received: from [199.232.76.173] (port=53083 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L9klo-0004cc-7p for qemu-devel@nongnu.org; Mon, 08 Dec 2008 13:23:48 -0500 Received: from yx-out-1718.google.com ([74.125.44.155]:33930) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L9kln-0004sJ-IC for qemu-devel@nongnu.org; Mon, 08 Dec 2008 13:23:48 -0500 Received: by yx-out-1718.google.com with SMTP id 3so715919yxi.82 for ; Mon, 08 Dec 2008 10:23:33 -0800 (PST) Message-ID: <493D6621.90806@codemonkey.ws> Date: Mon, 08 Dec 2008 12:23:29 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool References: <1228512061-25398-1-git-send-email-aliguori@us.ibm.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Anthony Liguori , qemu-devel@nongnu.org, kvm-devel Blue Swirl wrote: > On 12/5/08, Anthony Liguori wrote: > > Some cleanup needed here? > Hrm, yeah. >> +int _compat_aio_init(struct aioinit *aioinit) >> +static int _compat_aio_submit(struct aiocb *aiocb, int is_write) >> +int _compat_aio_read(struct aiocb *aiocb) >> +int _compat_aio_write(struct aiocb *aiocb) >> +ssize_t _compat_aio_return(struct aiocb *aiocb) >> +int _compat_aio_error(struct aiocb *aiocb) >> +int _compat_aio_cancel(int fd, struct aiocb *aiocb) >> > > The names should not begin with an underscore. > This okay by C99, if we're going to rename the aioinit structure, we might as well just rename it all to qemu_aio_XX or something like that. >> +struct aiocb >> +{ >> + int aio_fildes; >> + void *aio_buf; >> + size_t aio_nbytes; >> + struct sigevent aio_sigevent; >> + off_t aio_offset; >> + >> + /* private */ >> + TAILQ_ENTRY(aiocb) node; >> + int is_write; >> + ssize_t ret; >> + int active; >> +}; >> + >> +struct aioinit >> +{ >> + int aio_threads; >> + int aio_num; >> + int aio_idle_time; >> +}; >> > > These structs should probably be named qemu_aiocb and qemu_aioinit to > avoid conflict with system types. > > I like to use unsigned types whenever possible, IIRC compilers may > generate better code with those. > Yeah, I don't disagree. I was trying to maintain glibc compatibility. That's not strictly necessary though. Regards, Anthony Liguori > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >