Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751128AbdFTRZ3 (ORCPT ); Tue, 20 Jun 2017 13:25:29 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:38476 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751036AbdFTRZ1 (ORCPT ); Tue, 20 Jun 2017 13:25:27 -0400 Subject: Re: [PATCH v4 15/18] xen/pvcalls: implement the ioworker functions To: Stefano Stabellini , xen-devel@lists.xen.org References: <1497553787-3709-1-git-send-email-sstabellini@kernel.org> <1497553787-3709-15-git-send-email-sstabellini@kernel.org> Cc: linux-kernel@vger.kernel.org, jgross@suse.com, Stefano Stabellini From: Boris Ostrovsky Message-ID: <20a2911b-9a6c-1a43-6972-83daa83c5b3a@oracle.com> Date: Tue, 20 Jun 2017 13:26:29 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1497553787-3709-15-git-send-email-sstabellini@kernel.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 717 Lines: 18 On 06/15/2017 03:09 PM, Stefano Stabellini wrote: > We have one ioworker per socket. Each ioworker goes through the list of > outstanding read/write requests. Once all requests have been dealt with, > it returns. > > We use one atomic counter per socket for "read" operations and one > for "write" operations to keep track of the reads/writes to do. > > We also use one atomic counter ("io") per ioworker to keep track of how > many outstanding requests we have in total assigned to the ioworker. The > ioworker finishes when there are none. > > Signed-off-by: Stefano Stabellini > CC: boris.ostrovsky@oracle.com > CC: jgross@suse.com Reviewed-by: Boris Ostrovsky