Linux Container Development
 help / color / mirror / Atom feed
From: Cedric Le Goater <clg-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
To: Cedric Le Goater <clg-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	Nathan Lynch <ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>,
	Dave Hansen
	<dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Subject: Re: [RFC cr-pipe-v13][PATCH 2/3] Checkpoint open pipes
Date: Mon, 09 Feb 2009 15:39:36 +0100	[thread overview]
Message-ID: <49904028.8010001@fr.ibm.com> (raw)
In-Reply-To: <498D8489.6090904-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>

Cedric Le Goater wrote:
> Dave Hansen wrote:
>> On Fri, 2009-02-06 at 18:20 +0100, Cedric Le Goater wrote:
>>>> Sleeping inside mutexes is OK.  In general, they're drop-in compatible
>>>> with semaphore behavior.
>>> what about the vfs_write() ? 
>> Unless vfs_write() can come back and take the same mutex, I still think
>> you're OK.  
> 
> generic_file_aio_write() locks the inode mutex.

For example, here's what we would get with lockdep enabled on similar
code we use to dump pipes. 

hmm, I think this is a false lockdep alarm.

C.

[   49.460000] =============================================
[   49.460000] [ INFO: possible recursive locking detected ]
[   49.460000] 2.6.27-00195-g2aa4c1c-dirty #85
[   49.460000] ---------------------------------------------
[   49.460000] mcr-checkpoint/1931 is trying to acquire lock:
[   49.460000]  (&sb->s_type->i_mutex_key#3){--..}, at: [<c014da37>] generic_file_aio_write+0x54/0xbd
[   49.460000] 
[   49.460000] but task is already holding lock:
[   49.460000]  (&sb->s_type->i_mutex_key#3){--..}, at: [<c016ed63>] pipe_dump_content+0x20/0x14e
[   49.460000] 
[   49.460000] other info that might help us debug this:
[   49.460000] 1 lock held by mcr-checkpoint/1931:
[   49.460000]  #0:  (&sb->s_type->i_mutex_key#3){--..}, at: [<c016ed63>] pipe_dump_content+0x20/0x14e
[   49.460000] 
[   49.460000] stack backtrace:
[   49.460000] Pid: 1931, comm: mcr-checkpoint Not tainted 2.6.27-00195-g2aa4c1c-dirty #85
[   49.460000]  [<c0282761>] ? printk+0xf/0x16
[   49.460000]  [<c0134ed9>] __lock_acquire+0xb52/0x11d5
[   49.460000]  [<c0186cdd>] ? generic_write_end+0x6d/0x77
[   49.460000]  [<c014c971>] ? generic_file_buffered_write+0x178/0x503
[   49.460000]  [<c01355a4>] lock_acquire+0x48/0x64
[   49.460000]  [<c014da37>] ? generic_file_aio_write+0x54/0xbd
[   49.460000]  [<c0283811>] mutex_lock_nested+0xc2/0x208
[   49.460000]  [<c014da37>] ? generic_file_aio_write+0x54/0xbd
[   49.460000]  [<c014da37>] ? generic_file_aio_write+0x54/0xbd
[   49.460000]  [<c014da37>] generic_file_aio_write+0x54/0xbd
[   49.460000]  [<c0169a04>] do_sync_write+0xab/0xe9
[   49.460000]  [<c012a345>] ? autoremove_wake_function+0x0/0x33
[   49.460000]  [<c0133acb>] ? mark_held_locks+0x53/0x6a
[   49.460000]  [<c0169959>] ? do_sync_write+0x0/0xe9
[   49.460000]  [<c016a1b3>] vfs_write+0x8a/0x104
[   49.460000]  [<c016ee5b>] pipe_dump_content+0x118/0x14e
[   49.460000]  [<c01445ad>] mcr_pipe_dump_content+0x25/0x35
[   49.460000]  [<c014472c>] sys_mcr+0x16f/0x2eb
[   49.460000]  [<c0133c42>] ? trace_hardirqs_on_caller+0xe1/0x102
[   49.460000]  [<c0102cd6>] syscall_call+0x7/0xb
[   49.460000]  =======================

  parent reply	other threads:[~2009-02-09 14:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-27 21:23 [RFC cr-pipe-v13][PATCH 0/3] c/r of open pipes Oren Laadan
     [not found] ` <1233091395-24582-1-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-01-27 21:23   ` Oren Laadan
2009-01-27 21:23   ` [RFC cr-pipe-v13][PATCH 1/3] A new file type (CR_FD_OBJREF) for a file descriptor already setup Oren Laadan
2009-01-27 21:23   ` [RFC cr-pipe-v13][PATCH 2/3] Checkpoint open pipes Oren Laadan
     [not found]     ` <1233091395-24582-4-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-02-05  9:45       ` Cedric Le Goater
     [not found]         ` <498AB553.3090902-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2009-02-06  2:26           ` Nathan Lynch
     [not found]             ` <20090205202637.4d4f4a29-4v5LP+xe+1byhTdZtsIeww@public.gmane.org>
2009-02-06 13:05               ` Cedric Le Goater
2009-02-06 17:11               ` Dave Hansen
2009-02-06 17:20                 ` Cedric Le Goater
     [not found]                   ` <498C715B.4050303-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2009-02-06 17:24                     ` Dave Hansen
2009-02-07 12:54                       ` Cedric Le Goater
     [not found]                         ` <498D8489.6090904-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2009-02-09 14:39                           ` Cedric Le Goater [this message]
2009-01-27 21:23   ` [RFC cr-pipe-v13][PATCH 3/3] Restore " Oren Laadan
     [not found]     ` <1233091395-24582-5-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-02-02 17:43       ` Dan Smith
     [not found]         ` <87k5887n16.fsf-FLMGYpZoEPULwtHQx/6qkW3U47Q5hpJU@public.gmane.org>
2009-02-03  0:02           ` Oren Laadan
     [not found]             ` <498789B1.80601-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-02-03 16:23               ` Dan Smith
2009-01-27 21:29   ` [RFC cr-pipe-v13][PATCH 0/3] c/r of " Oren Laadan

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=49904028.8010001@fr.ibm.com \
    --to=clg-nmtc/0zbporqt0dzr+alfa@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    --cc=ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org \
    /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