Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757388AbZF2Rih (ORCPT ); Mon, 29 Jun 2009 13:38:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754044AbZF2Ri0 (ORCPT ); Mon, 29 Jun 2009 13:38:26 -0400 Received: from x35.xmailserver.org ([64.71.152.41]:44727 "EHLO x35.xmailserver.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752941AbZF2Ri0 (ORCPT ); Mon, 29 Jun 2009 13:38:26 -0400 X-AuthUser: davidel@xmailserver.org Date: Mon, 29 Jun 2009 10:36:30 -0700 (PDT) From: Davide Libenzi X-X-Sender: davide@makko.or.mcafeemobile.com To: Jarek Poplawski cc: Jiri Olsa , netdev@vger.kernel.org, Linux Kernel Mailing List , fbl@redhat.com, nhorman@redhat.com, davem@redhat.com, htejun@gmail.com, oleg@redhat.com, eric.dumazet@gmail.com Subject: Re: [PATCH 1/2] net: adding memory barrier to the poll and receive callbacks In-Reply-To: <20090629173217.GC2742@ami.dom.local> Message-ID: References: <20090629140434.GE3845@jolsa.lab.eng.brq.redhat.com> <20090629141445.GF3845@jolsa.lab.eng.brq.redhat.com> <20090629173217.GC2742@ami.dom.local> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) X-GPG-FINGRPRINT: CFAE 5BEE FD36 F65E E640 56FE 0974 BF23 270F 474E X-GPG-PUBLIC_KEY: http://www.xmailserver.org/davidel.asc MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 965 Lines: 27 On Mon, 29 Jun 2009, Jarek Poplawski wrote: > > I think Oleg already said this, but you can use directly poll_wait() > > without adding another abstraction, and the compiler will drop the double > > check for you: > > I think Oleg told about cosmetics and let Jiri to choose. I'd only > add it's not mainly about optimization, but easy showing the main > difference, of course depending on taste. We already have a universally used function to do that, and that's poll_wait(). That code (adding an extra __poll_wait()) was entirely about optimizations (otherwise why not use the existing poll_wait()?), so if the optimization does not actually take place, IMO it's better to not add an extra API. - Davide -- 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/