(This is an RFC for internal review before posting the public RFC) This is a patchset that addresses the issues with dirty writeout that we have seen. The fundamental issue is that the dirty limits are calculated for the whole machine. This breaks the throttling logic for cpusets which has the effect of OOMs for NFS mounted filesystems and results dirty throttling not occurring effectively with other files sytems which may lead to page based writeout from reclaim. In order to fix the problem we first of all introduce a method to establish a map of nodes that contain dirty pages for each inode mapping. Secondly we modify the dirty limit calculation to be based on the surrounding cpuset. If we are in a cpuset then we select only inodes for writeback that have pages on the nodes of the cpuset. After we have the new throttling in place we can then make further fixups: A. We can do inode based writeout from direct reclaim avoiding single page writes to the filesystem. B. We add a new counter NR_UNRECLAIMABLE that is subtracted from the available pages in a node. This allows us to accurately calculate the dirty ratio even if large portions of the node have been allocated for huge pages or for slab pages.