public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: Gleb Natapov <gleb@redhat.com>,
	davidel@xmailserver.org, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH-RFC 2/2] eventfd: EFD_STATE flag
Date: Tue, 4 Aug 2009 12:26:21 +0300	[thread overview]
Message-ID: <20090804092621.GB3185@redhat.com> (raw)
In-Reply-To: <4A77FFB5.4060201@redhat.com>

On Tue, Aug 04, 2009 at 12:30:29PM +0300, Avi Kivity wrote:
> On 08/04/2009 12:23 PM, Gleb Natapov wrote:
>> On Tue, Aug 04, 2009 at 12:25:49PM +0300, Avi Kivity wrote:
>>    
>>> On 08/04/2009 12:17 PM, Gleb Natapov wrote:
>>>      
>>>>> If a different read comes after the write but after our read, it will
>>>>> have transferred the value, resulting in the same situation.
>>>>>
>>>>> I think reads should never block with a state based mechanism.
>>>>>
>>>>>
>>>>>          
>>>> Reader may want to poll for the status change.
>>>>
>>>>        
>>> Without epoll(), it's inherently racy since reads from other processes
>>> can clear the status.
>>>
>>>      
>> This is correct for any file descriptor. Multiple readers shouldn't
>> simultaneously read from the same files descriptor if they expect to
>> make any sense from a result.
>>    
>
> I think counting eventfd is an exception, but in general you are right.

How is it an exception? It seems that one reader get the counter,
others will block until the next write.

> -- 
> error compiling committee.c: too many arguments to function

  reply	other threads:[~2009-08-04  9:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1248803500.git.mst@redhat.com>
2009-07-28 17:54 ` [PATCH-RFC 1/2] eventfd: reorganize the code to simplify new flags Michael S. Tsirkin
2009-07-28 17:55 ` [PATCH-RFC 2/2] eventfd: EFD_STATE flag Michael S. Tsirkin
2009-08-03 15:09   ` Avi Kivity
2009-08-03 15:14     ` Michael S. Tsirkin
2009-08-03 15:29       ` Avi Kivity
2009-08-03 16:57         ` Michael S. Tsirkin
2009-08-04  8:53           ` Avi Kivity
2009-08-04  8:54             ` Michael S. Tsirkin
2009-08-04  9:17               ` Avi Kivity
2009-08-04  9:17                 ` Gleb Natapov
2009-08-04  9:25                   ` Avi Kivity
2009-08-04  9:23                     ` Gleb Natapov
2009-08-04  9:30                       ` Avi Kivity
2009-08-04  9:26                         ` Michael S. Tsirkin [this message]
2009-08-04 10:06                           ` Avi Kivity
2009-08-04  9:33                 ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090804092621.GB3185@redhat.com \
    --to=mst@redhat.com \
    --cc=avi@redhat.com \
    --cc=davidel@xmailserver.org \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox