From mboxrd@z Thu Jan 1 00:00:00 1970 From: Artem Bityutskiy Subject: [RFC] few hacks to optimize write-back Date: Fri, 22 May 2009 21:38:20 +0300 Message-ID: <20090522183820.29556.68026.sendpatchset@localhost.localdomain> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Artem Bityutskiy To: linux-fsdevel@vger.kernel.org Return-path: Received: from smtp.nokia.com ([192.100.105.134]:50463 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751688AbZEVQpN (ORCPT ); Fri, 22 May 2009 12:45:13 -0400 Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-mx09.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id n4MGjCYA024732 for ; Fri, 22 May 2009 11:45:16 -0500 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hi, I've spotted that the periodic write-back threads wakes up every 5 seconds, even though there are no dirty data. And it still wakes up and wake up and disturbs the CPU which is resting in a low power consumption state. I've tried to optimize this a bit and make the periodic write-back stop when there are no dirty data. Here are 2 patches which kind of help. They are just quick hacks. I did not want to spend much time on this and I'd like to get some comments/directions first: * I'm not sure I went the right path; * there are new per-BDI patches from Jens, and I probably should work on top of them. AFAIU, the periodic write-back may be stopped if there are no dirty inodes and no dirty super-blocks. And it should start an inode or superblock is marked as dirty. =46or inodes, I've hooked to '__mark_inode_dirty()'. =46or superblocks. Well, probably a new VFS helper like 'mark_sb_dirty()' should be introduced. Also, FSes currently may mark SB as clean directly, but probably they should use a 'mark_sb_clean()' helper. FSes should not touch sb->s_dirt directly. Anyway, I have not implemented this part. --=20 Best Regards, Artem Bityutskiy (=D0=90=D1=80=D1=82=D1=91=D0=BC =D0=91=D0=B8=D1=82=D1=8E= =D1=86=D0=BA=D0=B8=D0=B9) -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html