From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wu Fengguang Subject: [PATCH 0/3] sync livelock fixes Date: Sun, 01 May 2011 06:36:05 +0800 Message-ID: <20110430223605.034517922@intel.com> Cc: Jan Kara , Dave Chinner To: Andrew Morton Return-path: Received: from mga02.intel.com ([134.134.136.20]:5209 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756810Ab1D3WsD (ORCPT ); Sat, 30 Apr 2011 18:48:03 -0400 Cc: Christoph Hellwig Cc: Wu Fengguang , LKML cc: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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; }