Re: [PATCH 3/3] Add timeout feature

From: Pavel Machek
Date: Wed Jul 09 2008 - 16:57:12 EST


On Wed 2008-07-09 09:08:07, Miklos Szeredi wrote:
> On Tue, 8 Jul 2008, Arjan van de Ven wrote:
> > I tihnk the idea there is
> >
> > freeze . do the snapshot op . unfreeze . make backup of snapshot
>
> Ah, so then my proposal would become
>
> run_frozen mountpoint do-snapshot
> do-backup
> release-snapshot
>
> and if they are afraid of deadlocks they can just implement the
> timeout in userspace:
>
> run_frozen -t timeout mountpoint do-snapshot
>
> 'run_frozen' can be a trivial 30 line app, that can be guaranteed not
> to deadlock.

Userland apps can be swapped out and need kernel memory allocations
during syscalls.

I bet even sleep(30) uses kmalloc internally.

So yes, even trivial applications can deadlock.

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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/