From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: why are WB_SYNC_NONE COMMITs being done with FLUSH_SYNC set ? Date: Thu, 19 Aug 2010 11:24:08 -0400 Message-ID: <20100819152408.GA29877@infradead.org> References: <20100819101525.076831ad@barsoom.rdu.redhat.com> <20100819143710.GA4752@infradead.org> <1282229905.6199.19.camel@heimdal.trondhjem.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , Jeff Layton , fengguang.wu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, hughd-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, chris.mason-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org, konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org To: Trond Myklebust Return-path: Content-Disposition: inline In-Reply-To: <1282229905.6199.19.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org> Sender: linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-fsdevel.vger.kernel.org On Thu, Aug 19, 2010 at 10:58:25AM -0400, Trond Myklebust wrote: > To me that sounds fine. I've also been trying to wrap my head around the > differences between 'nonblocking', 'for_background', 'for_reclaim' and > 'for_kupdate' and how the filesystem is supposed to treat them. Yeah, it's not clear to me either. for_background is in fact only used in nfs, for the priority and the nfs_commit_inode flags, for_kupdate is only used in nfs, and in a really weird spot in btrfs, and for_reclaim is used in nfs, and two places in nilfs2 and in shmemfs. > Aside from the above, I've used 'for_reclaim', 'for_kupdate' and > 'for_background' in order to adjust the RPC request's queuing priority > (high in the case of 'for_reclaim' and low for the other two). Right now writepage calls to the filesystem can come from various places: - the flusher threads - VM reclaim (kswapd, memcg, direct reclaim) - memory migration - filemap_fdatawrite & other calls directly from FS code, also including fsync We have WB_SYNC_ALL set for the second, data integrity pass when doing a sync from the flusher threads, and when doing data integrity writes from fs context (most fsync but also a few others). All these obviously are high priority. It's not too easy to set priorities for the others in my opinion. -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html