Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755742AbYHNAa2 (ORCPT ); Wed, 13 Aug 2008 20:30:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753274AbYHNAaS (ORCPT ); Wed, 13 Aug 2008 20:30:18 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:55553 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752981AbYHNAaR (ORCPT ); Wed, 13 Aug 2008 20:30:17 -0400 Date: Wed, 13 Aug 2008 17:23:05 -0700 From: Greg KH To: Marcin Obara Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] Intel Management Engine Interface Message-ID: <20080814002305.GA7359@kroah.com> References: <20080813005835.GE22793@kroah.com> <20080813181850.GD4886@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1690 Lines: 48 On Wed, Aug 13, 2008 at 08:48:19PM +0100, Marcin Obara wrote: > 2008/8/13 Greg KH : > >> GET_VERSION is called frequently > > > > Why? Shouldn't it only be called once? > Once per connection. But you can have many clients connecting. Is that a real issue? > >> With ioctl - only one file handle is used, and userspace client logic > >> is simpler. > > > > But the kernel is messier and we are trying to not add any more ioctls > > to it. Especially for trivial things like the version number of the > > hardware device. > It's rather protocol version (=running software version) supported by > hardware device. > Hmmm, I just didn't know that there is something wrong with ioctls. There always have been :) > >> Normal flow looks like: > >> > >> open > >> ioctl(GET_VERSION) > > > > Great, do an additional open/read/close here for the version, I think > > you will find it pretty trivial to do :) > Right, it's trivial.... but will make userspace source code messier and bigger. > > Btw. I know we have powerful CPUs... but small wasting resources is > still wasting resources... so we still need new CPUs :-). So you keep your employer in business :) Seriously, an ioctl for a hardware version number is total overkill here. Your other ioctls are also suspect, please repost with the description of why they are all needed, with documentation about the user/kernel interface you have created here. thanks, greg k-h -- 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/