Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934972AbcKJQ0o (ORCPT ); Thu, 10 Nov 2016 11:26:44 -0500 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.163]:13188 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934617AbcKJQ0m (ORCPT ); Thu, 10 Nov 2016 11:26:42 -0500 X-RZG-AUTH: :P2EQZWCpfu+qG7CngxMFH1J+zrwiavkK6tmQaLfswM/RAW08C8KYHUlxfwrhu4f27QZY X-RZG-CLASS-ID: mo00 Date: Thu, 10 Nov 2016 17:26:33 +0100 From: Olaf Hering To: Boris Ostrovsky Cc: konrad.wilk@oracle.com, david.vrabel@citrix.com, linux-kernel@vger.kernel.org, stable@vger.kernel.org, xen-devel@lists.xen.org Subject: Re: [Xen-devel] [PATCH RESEND] xen/gntdev: Grant maps should not be subject to NUMA balancing Message-ID: <20161110162633.GA5301@aepfle.de> References: <1447186233-3194-1-git-send-email-boris.ostrovsky@oracle.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2oS5YaxWCcQjTEyO" Content-Disposition: inline In-Reply-To: <1447186233-3194-1-git-send-email-boris.ostrovsky@oracle.com> User-Agent: Mutt/1.6.2 (6759) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1525 Lines: 60 --2oS5YaxWCcQjTEyO Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 10, Boris Ostrovsky wrote: > Doing so will cause the grant to be unmapped and then, during > fault handling, the fault to be mistakenly treated as NUMA hint > fault. >=20 > In addition, even if those maps could partcipate in NUMA > balancing, it wouldn't provide any benefit since we are unable > to determine physical page's node (even if/when VNUMA is > implemented). >=20 > Marking grant maps' VMAs as VM_IO will exclude them from being > part of NUMA balancing. This breaks qdisk+aio because now such pages are rejected 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 domU.cfg: builder=3Dhvm disk=3D['vdev=3Dxvda, direct-io-safe, backendtype=3Dqdisk, target=3Dimg.raw= '] > @@ -802,7 +802,7 @@ static int gntdev_mmap(struct file *flip, struct vm_a= rea_struct *vma) > - vma->vm_flags |=3D VM_DONTEXPAND | VM_DONTDUMP; > + vma->vm_flags |=3D VM_DONTEXPAND | VM_DONTDUMP | VM_IO; Olaf --2oS5YaxWCcQjTEyO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAlgkn7YACgkQXUKg+qaYNn6uXwCfXOvTZiTx61f3CFKE3ilvLngg lZYAn1AjjWCVeSpQXKBXS4eYcXxXYdin =qER/ -----END PGP SIGNATURE----- --2oS5YaxWCcQjTEyO--