Re: Block device throttling [Re: Distributed storage.]

From: Evgeniy Polyakov
Date: Mon Aug 13 2007 - 10:58:47 EST


On Mon, Aug 13, 2007 at 05:18:14AM -0700, Daniel Phillips (phillips@xxxxxxxxx) wrote:
> > If limit is for
> > 1gb of pending block io, and system has for example 2gbs of ram (or
> > any other resonable parameters), then there is no way we can deadlock
> > in allocation, since it will not force page reclaim mechanism.
>
> The problem is that sk_alloc (called from our block driver via
> socket->write) would recurse into shrink_pages, which recursively
> submits IO to our block driver and blocks on the throttle. Subtle
> indeed, and yet another demonstration of why vm recursion is a Bad
> Thing.
>
> I will find a traceback for you tomorrow, which makes this deadlock much
> clearer.

I see how it can happen, but device throttling is a solution we are
trying to complete, which main aim _is_ to remove this problem.

Lower per-device limit, so that the rest of the RAM allowed to
allocate all needed data structures in the network path.
Above example just has 1gb of ram, which should be enough for skbs, if
it is not, decrease limit to 500 mb and so on, until weighted load of
the system allows to always have a forward progress.

--
Evgeniy Polyakov
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/