From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760024AbXK0Vjq (ORCPT ); Tue, 27 Nov 2007 16:39:46 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757470AbXK0Vji (ORCPT ); Tue, 27 Nov 2007 16:39:38 -0500 Received: from smtp2.linux-foundation.org ([207.189.120.14]:57530 "EHLO smtp2.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757061AbXK0Vjh (ORCPT ); Tue, 27 Nov 2007 16:39:37 -0500 Date: Tue, 27 Nov 2007 13:39:19 -0800 From: Andrew Morton To: Davide Libenzi Cc: linux-kernel@vger.kernel.org, mtk-manpages@gmx.net, tglx@linutronix.de, torvalds@linux-foundation.org Subject: Re: [patch 2/4] Timerfd v3 - new timerfd API Message-Id: <20071127133919.71e9bc00.akpm@linux-foundation.org> In-Reply-To: References: <20071127010254.133e222f.akpm@linux-foundation.org> X-Mailer: Sylpheed version 2.2.4 (GTK+ 2.8.20; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 27 Nov 2007 12:47:46 -0800 (PST) Davide Libenzi wrote: > On Tue, 27 Nov 2007, Andrew Morton wrote: > > > On Sun, 25 Nov 2007 14:14:19 -0800 Davide Libenzi wrote: > > > > > +static struct file *timerfd_fget(int fd) > > > +{ > > > + struct file *file; > > > + > > > + file = fget(fd); > > > + if (!file) > > > + return ERR_PTR(-EBADF); > > > + if (file->f_op != &timerfd_fops) { > > > + fput(file); > > > + return ERR_PTR(-EINVAL); > > > + } > > > + > > > + return file; > > > +} > > > > I suppose we could use fget_light() in here sometime. It is significantly > > quicker in microbenchmarks. Or it was - nobody has checked that in a few > > years afaik. > > Should I now? No great rush. It'd be fun to see if it actually makes any measurable difference on modern hardware (hint ;)). > Half of the internet traffic of the last three month was > generated by me posting those timerfd patches :) Which means my inbox gets 3000% of the internet. Thought so.