Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261238AbUCCXId (ORCPT ); Wed, 3 Mar 2004 18:08:33 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261241AbUCCXId (ORCPT ); Wed, 3 Mar 2004 18:08:33 -0500 Received: from fw.osdl.org ([65.172.181.6]:54473 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S261238AbUCCXIb (ORCPT ); Wed, 3 Mar 2004 18:08:31 -0500 Date: Wed, 3 Mar 2004 15:14:31 -0800 (PST) From: Linus Torvalds To: "Richard B. Johnson" cc: David Dillow , Bill Davidsen , Roland Dreier , Linux Kernel Mailing List Subject: Re: poll() in 2.6 and beyond In-Reply-To: Message-ID: References: <1vmPm-4lU-11@gated-at.bofh.it> <1vonq-6dr-37@gated-at.bofh.it> <1voGY-6vC-41@gated-at.bofh.it> <1vpjt-7dl-17@gated-at.bofh.it> <1vpCV-7wY-41@gated-at.bofh.it> <1vpWa-7Py-19@gated-at.bofh.it> <4045106D.8060902@tmr.com> <1078286221.4302.23.camel@ori.thedillows.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1138 Lines: 29 On Wed, 3 Mar 2004, Richard B. Johnson wrote: > > And YES! If I clear the flag only after it is read. It "fixes" the > observed problem! Ok. That solves one problem, but it does seem to point to the fact that 2.6.x calls down to poll() more than 2.4.x does. It really _is_ normal to have multiple calls to "poll()" for the same fd as a result of a single "poll()" system call, but if we actually get a positive hit (ie the ->poll() call returns a bit that we consider to be a success by comparing it to what we _wanted_ to see), then we should have stopped doing that. And since your test program always sets "POLLIN", any ->poll() call that has the POLLIN flag set should have ended up being the last one (since it would have marked a "success"). So there's still something I don't understand, and that seems to differ between 2.4.x and 2.6.x. Can anybody else see it? Linus - 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/