linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nelson Elhage <nelhage@ksplice.com>
To: Paul Bolle <pebolle@tiscali.nl>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org,
	Davide Libenzi <davidel@xmailserver.org>
Subject: Re: [PATCH] epoll: Fix spurious lockdep warnings.
Date: Sun, 31 Jul 2011 11:16:28 -0400	[thread overview]
Message-ID: <20110731151626.GA5952@ksplice.com> (raw)
In-Reply-To: <1312124775.2072.11.camel@t41.thuisdomein>

Sure -- it's quite simple if you've worked with epoll before. This
cut-down version is even simpler than the previous one I had, and I'd
be happy to add it to the commit message.

--------------------8<--------------------
#include <sys/epoll.h>

int main(void) {
    int e1, e2;
    struct epoll_event evt = {
        .events = EPOLLIN
    };

    e1 = epoll_create1(0);
    e2 = epoll_create1(0);
    epoll_ctl(e1, EPOLL_CTL_ADD, e2, &evt);
    return 0;
}
--------------------8<--------------------

- Nelson

On Sun, Jul 31, 2011 at 05:06:10PM +0200, Paul Bolle wrote:
> On Sat, 2011-07-30 at 18:30 -0400, Nelson Elhage wrote:
> >  I've tested this on a synthetic epoll test case, that just adds e1 to
> >  e2 and then does an epoll_wait(). I verified that it caused lockdep
> >  problems on 3.0 and that this patch fixed it, but I haven't done more
> >  extensive testing.
> 
> I was unable to come up with such a test case myself. Could you perhaps
> share it?
> 
> (Maybe that test case could even be added tot the commit message. I seem
> to remember an earlier commit that you were involved with which had a
> test case added. That helped me understand eventpoll's interface - at
> least enough to pinpoint the problem. Looking at a test case is much
> easier than grepping through a program like systemd. Issues in non-test
> case programs tend to increase the bug hunting challenge: one is faced
> with an issue in an interface one hasn't used before triggered by a
> program one hasn't studied before.)
> 
> > Paul, are you able to test systemd against this?
> 
> I hope to do so shortly (ie, in the next 24 hours).
> 
> 
> Paul Bolle
> 

  reply	other threads:[~2011-07-31 15:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4E1FF63F.4040704@gmail.com>
     [not found] ` <20110715210420.GA22551@redhat.com>
     [not found]   ` <1311249346.2098.12.camel@t41.thuisdomein>
2011-07-29 18:50     ` recursive locking: epoll Paul Bolle
2011-07-30 18:26       ` Nelson Elhage
2011-07-30 21:25         ` Nelson Elhage
2011-07-30 22:30           ` [PATCH] epoll: Fix spurious lockdep warnings Nelson Elhage
2011-07-31 15:06             ` Paul Bolle
2011-07-31 15:16               ` Nelson Elhage [this message]
2011-07-31 21:39                 ` Paul Bolle
2011-07-31 21:36             ` Paul Bolle
2011-07-31 21:48             ` Paul Bolle
2011-08-09 15:11             ` Josh Boyer
2011-08-09 17:36               ` Nelson Elhage
2011-08-09 18:11 Nelson Elhage
2011-09-08  0:04 ` Josh Boyer
2011-09-13 20:22   ` Jason Baron
2011-09-13 21:16     ` Andrew Morton
2011-09-15 15:15       ` Jason Baron

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=20110731151626.GA5952@ksplice.com \
    --to=nelhage@ksplice.com \
    --cc=davidel@xmailserver.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=pebolle@tiscali.nl \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).