Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754318Ab3GJKkf (ORCPT ); Wed, 10 Jul 2013 06:40:35 -0400 Received: from cantor2.suse.de ([195.135.220.15]:51852 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753545Ab3GJKke (ORCPT ); Wed, 10 Jul 2013 06:40:34 -0400 Subject: Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: Alexander Graf In-Reply-To: <1373452753.19894.19.camel@pasglop> Date: Wed, 10 Jul 2013 12:40:30 +0200 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 Content-Transfer-Encoding: 7bit Message-Id: 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> <1373452753.19894.19.camel@pasglop> To: Benjamin Herrenschmidt X-Mailer: Apple Mail (2.1278) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 838 Lines: 25 On 10.07.2013, at 12:39, Benjamin Herrenschmidt wrote: > 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 :-) Yeah, that's fortunately code that I don't have to read :). Alex -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/