Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753823AbcKPRUu (ORCPT ); Wed, 16 Nov 2016 12:20:50 -0500 Received: from smtp.citrix.com ([66.165.176.89]:25382 "EHLO SMTP.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752899AbcKPRUt (ORCPT ); Wed, 16 Nov 2016 12:20:49 -0500 X-IronPort-AV: E=Sophos;i="5.31,500,1473120000"; d="scan'208";a="389881930" Subject: Re: [Xen-devel] [PATCH] xen/gntdev: Use mempolicy instead of VM_IO flag to avoid NUMA balancing To: Boris Ostrovsky , , References: <1479315762-32060-1-git-send-email-boris.ostrovsky@oracle.com> CC: , , From: David Vrabel X-Enigmail-Draft-Status: N1110 Message-ID: <1a48f1f5-2895-b122-8c28-4857a7e8a06d@citrix.com> Date: Wed, 16 Nov 2016 17:20:46 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: <1479315762-32060-1-git-send-email-boris.ostrovsky@oracle.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 Content-Length: 1033 Lines: 37 On 16/11/16 17:02, Boris Ostrovsky wrote: > Commit 9c17d96500f7 ("xen/gntdev: Grant maps should not be subject to > NUMA balancing") set VM_IO flag to prevent grant maps from being > subjected to NUMA balancing. > > It was discovered recently this this flag may cause page allocation > failures with the following stack: It's not an allocation failure. "It was discovered recently that this flag causes get_user_pages() to always fail with -EFAULT." > check_vma_flags > __get_user_pages > __get_user_pages_locked > __get_user_pages_unlocked > get_user_pages_fast > iov_iter_get_pages > dio_refill_pages > do_direct_IO > do_blockdev_direct_IO > do_blockdev_direct_IO > ext4_direct_IO_read > generic_file_read_iter > aio_run_iocb > > (which can happen if guest's vdisk has direct-io-safe option). > > To avoid this, instead of setting VM_IO use mempolicy that prohibits page > migration (i.e. clear policy's MPOL_F_MOF|MPOL_F_MORON) Reviewed-by: David Vrabel With the corrected commit message. David