From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH] tools/libxc: send page-in requests in batches in linux_privcmd_map_foreign_bulk Date: Thu, 26 Jan 2012 17:38:10 +0100 Message-ID: <20120126163810.GA9137@aepfle.de> References: <317844de67b9293a2e45ecd879a1c58a.squirrel@webmail.lagarcavilla.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <317844de67b9293a2e45ecd879a1c58a.squirrel@webmail.lagarcavilla.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Andres Lagar-Cavilla Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Thu, Jan 26, Andres Lagar-Cavilla wrote: > Olaf, > if I get a pattern of errors in the err array of the form: > > {ENOENT, EWHATEVER, ENOENT, EWHATEVER} > with EWHATEVER != ENOENT > > this patch does not optimize anything. It will poke all gfns instead of a single one before going to sleep. > Why not alloc a separate arr2 array, move the gfn's that failed with > ENOENT there, and retry the whole new arr2 block? You only need to > allocate arr2 once, to size num. That will batch always, everything. The errors for gfns are most likely fragmented. Merging the gfns means they will get a different addr. So the overall layout of arr and err needs to remain the same. Olaf