All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] sync livelock fixes v2
@ 2011-05-02  3:17 Wu Fengguang
  2011-05-02  3:17 ` [PATCH 1/3] writeback: introduce wbc.tagged_sync for the WB_SYNC_NONE sync stage Wu Fengguang
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Wu Fengguang @ 2011-05-02  3:17 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Jan Kara, Dave Chinner, Christoph Hellwig, Wu Fengguang, LKML,
	linux-fsdevel

Andrew,

changes from v1:
- retain tagged sync behavior for all WB_SYNC_ALL callers (Dave Chinner)
- rename wbc.for_sync to wbc.tagged_sync
- remove the changes to trace events

The below sync livelock test script is working fine after this patchset:

        sync time: 2
        Dirty:             26492 kB
        Writeback:         30260 kB
        NFS_Unstable:          0 kB
        WritebackTmp:          0 kB
        sync NOT livelocked

In particular patch 2 fixes the sync livelock problem introduced by patch
"writeback: try more writeback as long as something was written".

Thanks,
Fengguang
---

#!/bin/sh

umount /dev/sda7
# mkfs.xfs -f /dev/sda7
mkfs.ext4 /dev/sda7
mount /dev/sda7 /fs

echo $((50<<20)) > /proc/sys/vm/dirty_bytes

pid=
for i in `seq 10`
do     
        dd if=/dev/zero of=/fs/zero-$i bs=1M count=1000 &
        pid="$pid $!"
done

sleep 1

tic=$(date +'%s')
sync
tac=$(date +'%s')

echo
echo sync time: $((tac-tic))
egrep '(Dirty|Writeback|NFS_Unstable)' /proc/meminfo

pidof dd > /dev/null && { kill -9 $pid; echo sync NOT livelocked; }




^ permalink raw reply	[flat|nested] 20+ messages in thread
* [PATCH 0/3] sync livelock fixes
@ 2011-04-30 22:36 Wu Fengguang
  2011-04-30 22:36 ` [PATCH 3/3] writeback: avoid extra sync work at enqueue time Wu Fengguang
  0 siblings, 1 reply; 20+ messages in thread
From: Wu Fengguang @ 2011-04-30 22:36 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Jan Kara, Dave Chinner, Christoph Hellwig, Wu Fengguang, LKML,
	linux-fsdevel


Andrew,

I wrote a simple script to test sync livelock and this patchset is working as
expected:

	sync time: 2
	Dirty:             26492 kB
	Writeback:         30260 kB
	NFS_Unstable:          0 kB
	WritebackTmp:          0 kB
	sync NOT livelocked

In particular patch 2 fixes the sync livelock problem introduced by patch
"writeback: try more writeback as long as something was written".

Thanks,
Fengguang
---

#!/bin/sh

umount /dev/sda7
# mkfs.xfs -f /dev/sda7
mkfs.ext4 /dev/sda7
mount /dev/sda7 /fs

echo $((50<<20)) > /proc/sys/vm/dirty_bytes

pid=
for i in `seq 10`
do     
	dd if=/dev/zero of=/fs/zero-$i bs=1M count=1000 &
	pid="$pid $!"
done

sleep 1

tic=$(date +'%s')
sync
tac=$(date +'%s')

echo
echo sync time: $((tac-tic))
egrep '(Dirty|Writeback|NFS_Unstable)' /proc/meminfo

pidof dd > /dev/null && { kill -9 $pid; echo sync NOT livelocked; }



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2011-05-05 14:35 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-02  3:17 [PATCH 0/3] sync livelock fixes v2 Wu Fengguang
2011-05-02  3:17 ` [PATCH 1/3] writeback: introduce wbc.tagged_sync for the WB_SYNC_NONE sync stage Wu Fengguang
2011-05-04 21:00   ` Jan Kara
2011-05-05 12:14     ` Wu Fengguang
2011-05-05 13:55       ` Jan Kara
2011-05-05 14:06         ` Wu Fengguang
2011-05-02  3:17 ` [PATCH 2/3] writeback: update dirtied_when for synced inode to prevent livelock Wu Fengguang
2011-05-04 21:10   ` Jan Kara
2011-05-05 12:18     ` Wu Fengguang
2011-05-02  3:17 ` [PATCH 3/3] writeback: avoid extra sync work at enqueue time Wu Fengguang
2011-05-04 21:24   ` Jan Kara
2011-05-05 12:27     ` Wu Fengguang
2011-05-05 12:41       ` Christoph Hellwig
2011-05-05 12:42         ` Christoph Hellwig
2011-05-05 12:48           ` Wu Fengguang
2011-05-05 14:01       ` Jan Kara
2011-05-05 14:10         ` Wu Fengguang
2011-05-05 14:13           ` Wu Fengguang
2011-05-05 14:34           ` Jan Kara
  -- strict thread matches above, loose matches on Subject: below --
2011-04-30 22:36 [PATCH 0/3] sync livelock fixes Wu Fengguang
2011-04-30 22:36 ` [PATCH 3/3] writeback: avoid extra sync work at enqueue time Wu Fengguang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.