Re: LOCKDEP: 3.9-rc1: mount.nfs/4272 still has locks held!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

CC guys who introduced the lockdep change.

On Mon, Mar 4, 2013 at 11:04 PM, Jeff Layton <jlayton@xxxxxxxxxx> wrote:

>
> I don't get it -- why is it bad to hold a lock across a freeze event?

At least this may deadlock another mount.nfs during freezing, :-)

See detailed explanation in the commit log:

commit 6aa9707099c4b25700940eb3d016f16c4434360d
Author: Mandeep Singh Baines <msb@xxxxxxxxxxxx>
Date:   Wed Feb 27 17:03:18 2013 -0800

    lockdep: check that no locks held at freeze time

    We shouldn't try_to_freeze if locks are held.  Holding a lock can cause a
    deadlock if the lock is later acquired in the suspend or hibernate path
    (e.g.  by dpm).  Holding a lock can also cause a deadlock in the case of
    cgroup_freezer if a lock is held inside a frozen cgroup that is later
    acquired by a process outside that group.

> The problem that we have is that we must often hold locks across
> long-running syscalls (consider something like sync()). In the event
> that there is a lot of dirty data, it might take a long time for that
> to finish.
>
> There's also the problem that it's not uncommon for the freezer to take
> down userland processes (such as NetworkManager) which in turn take
> down network interfaces that we need to talk to the server.
>
> The fix from a couple of years ago (which admittedly needs more work)
> was to allow the freezing of tasks that are waiting on a reply from the
> server. That sort of necessitates that we are allowed to hold our locks
> across the try_to_freeze call though.
>
> If that's no longer allowed then we're back to square one with laptops
> that fail to suspend when they have NFS mounts. Is there some other
> solution we should pursue instead?


Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux