Received: from eggs.gnu.org ([2001:4830:134:3::10]:58841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFXkb-00063T-DN for qemu-devel@nongnu.org; Fri, 30 Aug 2013 19:05:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VFXkT-0003WN-5j for qemu-devel@nongnu.org; Fri, 30 Aug 2013 19:05:09 -0400 Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: Alexander Graf In-Reply-To: <1377901187.3978.6.camel@pasglop> Date: Sat, 31 Aug 2013 01:04:53 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <586EA479-7DAD-44AE-B115-CC50CF0910FE@suse.de> References: <1376891726-26122-1-git-send-email-aik@ozlabs.ru> <1376891726-26122-2-git-send-email-aik@ozlabs.ru> <5B9725EC-8FC8-469C-8758-08EED7D4206D@suse.de> <1377564201.3819.87.camel@pasglop> <521C0567.7070400@suse.de> <1377576606.3819.100.camel@pasglop> <315B31BA-FE61-45CA-A1C1-F1E67702E5F4@suse.de> <521F03EC.80908@ozlabs.ru> <9C0990B9-FFE9-4FC7-83E6-7BD754F2E540@suse.de> <1377901187.3978.6.camel@pasglop> Subject: Re: [Qemu-devel] [PATCH v3 1/8] target-ppc: Add helper for KVM_PPC_RTAS_DEFINE_TOKEN List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Benjamin Herrenschmidt Cc: Alexey Kardashevskiy , qemu-devel@nongnu.org, qemu-ppc@nongnu.org, Anthony Liguori , Paul Mackerras , =?iso-8859-1?Q?Andreas_F=E4rber?= , David Gibson On 31.08.2013, at 00:19, Benjamin Herrenschmidt wrote: > On Fri, 2013-08-30 at 16:34 +0200, Alexander Graf wrote: >=20 >>> So - kvmppc_define_rtas_in_kernel() or = kvmppc_define_rtas_kernel_token()? >>=20 >> The former probably. >=20 > I told him the latter :-) Honestly, your name is gross :-) Mine > describes exactly what the calls does. I really don't care which one, as long as it describes what it does. = Both names fit that description, just that the former is smaller :). = Really, pick any, as long as a random reader has the chance to know = what's going on. >=20 >>> I would actually though that the very first "k" is for "Kernel" = already but... >>=20 >> I a symmetric API you could also remove rtas handling from the = kernel, so you could tell the kernel "handle this in kernel space" and = "don't handle this in kernel space". Our naming needs to be precise = enough that you can guess what is going on from it. >=20 > But that's not quite what the API is doing and we don't want a = symetric > API it's pointless. >=20 > Yet another "my CS teacher told me a good API is symetric" (oh and > that's a nice word "symetric", it sounds *good*, using it makes it > look like we are plenty smart !) but in the end totally pointless > for the problem at hand. Imagine you don't know the KVM API in this case, but simply read the kvm = code. You don't know whether it's symmetric or not. It's not, and I = don't think it's a big issue that it isn't. But the reader doesn't know = at this point. So now you need to figure out what's going on. Either the function name = tells you (no time loss), you know where to find the KVM API = documentation and look it up there (small time loss) or you check the = actual code (even more time loss). Overall, I'm fairly sure we wasted more time arguing on this one by now = than anyone would ever waste on looking up anything on this function. Alex