From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756908AbcGGJh3 (ORCPT ); Thu, 7 Jul 2016 05:37:29 -0400 Received: from smtp.citrix.com ([66.165.176.89]:15207 "EHLO SMTP.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756353AbcGGJhU (ORCPT ); Thu, 7 Jul 2016 05:37:20 -0400 X-IronPort-AV: E=Sophos;i="5.28,324,1464652800"; d="scan'208";a="364798730" Subject: Re: [Xen-devel] [PATCH] xen/privcmd: sprinkle around cond_resched() calls in mmap ioctl handling To: Jan Beulich , , , Juergen Gross References: <577E224602000078000FBDC1@prv-mh.provo.novell.com> CC: , From: David Vrabel X-Enigmail-Draft-Status: N1110 Message-ID: <577E22CD.7000308@citrix.com> Date: Thu, 7 Jul 2016 10:37:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0 MIME-Version: 1.0 In-Reply-To: <577E224602000078000FBDC1@prv-mh.provo.novell.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-DLP: MIA1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/07/16 08:35, Jan Beulich wrote: > Many of these operations can take arbitrarily long, which can become a > problem irrespective of them being exposed to privileged users only. If this is a concern I would rather see large numbers of mapping requests processed in smaller batches. This would also limit the amount of memory needed. Note also that xen_remap_domain_gfn() array already has a cond_resched() after every batch of 16 GFNs. David