From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Subject: Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling Date: Wed, 10 Jul 2013 20:39:13 +1000 Message-ID: <1373452753.19894.19.camel@pasglop> References: <1373123227-22969-1-git-send-email-aik@ozlabs.ru> <1373123227-22969-9-git-send-email-aik@ozlabs.ru> <51DC4923.5010501@suse.de> <51DC9CDA.3070906@ozlabs.ru> <778C7C81-5F7F-4E21-8B72-92F336002F9E@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Alexey Kardashevskiy , linuxppc-dev@lists.ozlabs.org, David Gibson , Paul Mackerras , Alex Williamson , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, kvm-ppc@vger.kernel.org To: Alexander Graf Return-path: In-Reply-To: <778C7C81-5F7F-4E21-8B72-92F336002F9E@suse.de> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Wed, 2013-07-10 at 12:33 +0200, Alexander Graf wrote: > > It's not exactly obvious that you're calling it with writing == 1 :). > Can you create a new local variable "is_write" in the calling > function, set that to 1 before the call to get_user_pages_fast and > pass it in instead of the 1? The compiler should easily optimize all > of that away, but it makes the code by far easier to read. Ugh ? Nobody else does that .... (look at futex :-) Ben.