public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: John McCutchan <ttb@tentacle.dhs.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Robert Love <rml@novell.com>,
	Reuben Farrelly <reuben-lkml@reub.net>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: Re: Inotify problem [was Re: 2.6.13-rc6-mm1]
Date: Thu, 25 Aug 2005 11:16:39 -0400	[thread overview]
Message-ID: <1124982999.5110.4.camel@vertex> (raw)
In-Reply-To: <1124980907.19546.5.camel@localhost>

On Thu, 2005-08-25 at 16:41 +0200, Johannes Berg wrote:
> On Thu, 2005-08-25 at 10:13 -0400, John McCutchan wrote:
> 
> > I really don't want 2.6.13 to go out with this bug or the compromise. If
> > we use 0, we will have a lot of wd re-use. Which will cause "strange"
> > problems in inotify using applications that cleanup upon receipt of an
> > IN_IGNORE event.
> 
> What happens when, given bug-free code that doesn't reuse, you hit the
> 8192 limit with wd, even if they're not all open at the same time? Does
> it still add them, or will inotify give an error? And does the idr layer
> handle something like that gracefully without using lots of memory?
> 

The 8192 limit is the total watches in use at one time. If over time,
you use more than 8192 watches but not all at one time you will just
keep getting higher and higher wd's. I'm not 100% sure if idr handles it
gracefully. 

> The background is that the process using this is potentially quite
> long-running and keeps opening/closing wds, so 8192 doesn't sound like a
> high barrier, after all Reuben observed hitting the 1024 limit after 15
> minutes or so.

There isn't a 1024 limit, that is a bug in the idr code. He got to that
number by having used 1024 wd's throughout the life of the program.'


FYI, if we pass 0 to idr_get_new_above, both your test programs work
fine. But the first one re-uses wd's (back and forth between 0 & 1).

-- 
John McCutchan <ttb@tentacle.dhs.org>

  reply	other threads:[~2005-08-25 15:16 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <fa.h7s290f.i6qp37@ifi.uio.no>
     [not found] ` <fa.e1uvbs1.l407h7@ifi.uio.no>
2005-08-25 10:07   ` Inotify problem [was Re: 2.6.13-rc6-mm1] Reuben Farrelly
2005-08-25 12:18     ` Johannes Berg
2005-08-25 13:40       ` John McCutchan
2005-08-25 13:47         ` Robert Love
2005-08-25 14:03           ` Johannes Berg
2005-08-25 14:06             ` John McCutchan
2005-08-25 14:13               ` Johannes Berg
2005-08-25 14:39                 ` John McCutchan
2005-08-25 14:13           ` John McCutchan
2005-08-25 14:41             ` Johannes Berg
2005-08-25 15:16               ` John McCutchan [this message]
2005-08-25 13:50         ` Johannes Berg
2005-08-25 14:03           ` John McCutchan
2005-08-25 13:33     ` John McCutchan
2005-08-25 15:18       ` Robert Love
2005-08-25 18:54         ` George Anzinger
2005-08-25 19:03           ` Johannes Berg
2005-08-25 19:06             ` John McCutchan
2005-08-25 19:04           ` John McCutchan
2005-08-25 23:10             ` George Anzinger
2005-08-25 23:20               ` Johannes Berg
2005-08-26 17:03 Jim Houston
2005-08-26 17:52 ` John McCutchan
2005-08-26 17:56   ` Robert Love

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=1124982999.5110.4.camel@vertex \
    --to=ttb@tentacle.dhs.org \
    --cc=akpm@osdl.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=reuben-lkml@reub.net \
    --cc=rml@novell.com \
    /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