[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130326125245.47709256@tlielax.poochiereds.net>
Date: Tue, 26 Mar 2013 12:52:45 -0400
From: Jeff Layton <jlayton@...hat.com>
To: Tejun Heo <tj@...nel.org>
Cc: "J. Bruce Fields" <bfields@...ldses.org>,
akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
rusty@...tcorp.com.au, skinsbursky@...allels.com,
ebiederm@...ssion.com, jmorris@...ei.org, axboe@...nel.dk
Subject: Re: [PATCHSET] idr: implement idr_alloc() and convert existing
users
On Tue, 26 Mar 2013 09:36:35 -0700
Tejun Heo <tj@...nel.org> wrote:
> On Tue, Mar 26, 2013 at 09:33:51AM -0700, Tejun Heo wrote:
> > not be too bad. The optimal would be bitmap + hashtable, I suppose.
>
> Oops, with more restricted (or at least dynamically adjusted) ID
> space, that is.
>
> The problem with idr is that it can get pretty wasteful if the IDs
> become very scattered - the worst case being one ID per each idr_layer
> (the internal allocation block). That said, even cyclic allocation
> should yield somewhat clustered IDs, so I don't think it'd be too bad.
>
Right, that's a (minor) concern too...
While we can assume that cyclic allocations will probably give you
clustered IDs, we're somewhat at the mercy of the clients when it comes
to freeing them.
So, one could imagine a hostile client that attempts to DoS the server
by creating new stateids and releasing all but one in each idr_layer as
it goes.
Of course there are probably better ways to bring down the NFS
server :).
--
Jeff Layton <jlayton@...hat.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists