diff --git a/ntoskrnl/cc/cacheman.c b/ntoskrnl/cc/cacheman.c
index 8303dd9..9739215 100644
--- a/ntoskrnl/cc/cacheman.c
+++ b/ntoskrnl/cc/cacheman.c
@@ -49,8 +49,10 @@ VOID
 NTAPI
 CcShutdownSystem(VOID)
 {
+#ifdef _WITH_LAZY_WRITER
     /* Inform the lazy writer it has to stop activity */
     CcShutdownLazyWriter();
+#endif
 }
 
 /*
@@ -150,6 +152,7 @@ CcSetDirtyPageThreshold (
 	IN	ULONG		DirtyPageThreshold
 	)
 {
+#ifdef _WITH_LAZY_WRITER
     PFSRTL_COMMON_FCB_HEADER Fcb;
     PROS_SHARED_CACHE_MAP SharedCacheMap;
 
@@ -167,6 +170,7 @@ CcSetDirtyPageThreshold (
     {
         SetFlag(Fcb->Flags, FSRTL_FLAG_LIMIT_MODIFIED_PAGES);
     }
+#endif
 }
 
 /*
diff --git a/ntoskrnl/cc/copy.c b/ntoskrnl/cc/copy.c
index db6f0f4..da4c29ef 100644
--- a/ntoskrnl/cc/copy.c
+++ b/ntoskrnl/cc/copy.c
@@ -35,7 +35,9 @@ ULONG CcFastReadWait;
 ULONG CcFastReadNoWait;
 ULONG CcFastReadResourceMiss;
 
+#ifdef _WITH_LAZY_WRITER
 extern KEVENT iLazyWriterNotify;
+#endif
 
 /* FUNCTIONS *****************************************************************/
 
@@ -376,6 +378,7 @@ CcCanIWrite (
     IN BOOLEAN Wait,
     IN BOOLEAN Retrying)
 {
+#ifdef _WITH_LAZY_WRITER
     KIRQL OldIrql;
     ULONG DirtyPages;
     PLIST_ENTRY ListEntry;
@@ -441,6 +444,7 @@ CcCanIWrite (
     {
         return FALSE;
     }
+#endif
 
     return TRUE;
 }
@@ -518,6 +522,7 @@ CcDeferWrite (
     IN ULONG BytesToWrite,
     IN BOOLEAN Retrying)
 {
+#ifdef _WITH_LAZY_WRITER
     PROS_DEFERRED_WRITE_CONTEXT Context;
 
     CCTRACE(CC_API_DEBUG, "FileObject=%p PostRoutine=%p Context1=%p Context2=%p BytesToWrite=%lu Retrying=%d\n",
@@ -528,8 +533,10 @@ CcDeferWrite (
     /* If it failed, immediately execute the operation! */
     if (Context == NULL)
     {
+#endif
         PostRoutine(Context1, Context2);
         return;
+#ifdef _WITH_LAZY_WRITER
     }
 
     /* Otherwise, initialize the context */
@@ -555,6 +562,7 @@ CcDeferWrite (
                                     &Context->CcDeferredWritesEntry,
                                     &CcDeferredWriteSpinLock);
     }
+#endif
 }
 
 /*
@@ -622,6 +630,7 @@ NTAPI
 CcWaitForCurrentLazyWriterActivity (
     VOID)
 {
+#ifdef _WITH_LAZY_WRITER
     NTSTATUS Status;
 
     /* Lazy writer is done when its event is set */
@@ -634,6 +643,7 @@ CcWaitForCurrentLazyWriterActivity (
     {
         return Status;
     }
+#endif
 
     return STATUS_SUCCESS;
 }
diff --git a/ntoskrnl/cc/view.c b/ntoskrnl/cc/view.c
index 5588a91..fad051d 100644
--- a/ntoskrnl/cc/view.c
+++ b/ntoskrnl/cc/view.c
@@ -51,12 +51,14 @@ NPAGED_LOOKASIDE_LIST iBcbLookasideList;
 static NPAGED_LOOKASIDE_LIST SharedCacheMapLookasideList;
 static NPAGED_LOOKASIDE_LIST VacbLookasideList;
 
+#ifdef _WITH_LAZY_WRITER
 /* Counters:
  * - Amount of pages flushed by lazy writer
  * - Number of times lazy writer ran
  */
 ULONG CcLazyWritePages = 0;
 ULONG CcLazyWriteIos = 0;
+#endif
 
 /* Internal vars (MS):
  * - Threshold above which lazy writer will start action
@@ -64,17 +66,23 @@ ULONG CcLazyWriteIos = 0;
  * - List for deferred writes
  * - Spinlock when dealing with the deferred list
  */
+#ifdef _WITH_LAZY_WRITER
 ULONG CcDirtyPageThreshold = 0;
+#endif
 ULONG CcTotalDirtyPages = 0;
+#ifdef _WITH_LAZY_WRITER
 LIST_ENTRY CcDeferredWrites;
 KSPIN_LOCK CcDeferredWriteSpinLock;
+#endif
 
+#ifdef _WITH_LAZY_WRITER
 /* Internal vars (ROS):
  * - Event to notify lazy writer to shutdown
  * - Event to inform watchers lazy writer is done for this loop
  */
 KEVENT iLazyWriterShutdown;
 KEVENT iLazyWriterNotify;
+#endif
 
 #if DBG
 static void CcRosVacbIncRefCount_(PROS_VACB vacb, const char* file, int line)
@@ -301,6 +309,7 @@ CcRosFlushDirtyPages (
     return STATUS_SUCCESS;
 }
 
+#ifdef _WITH_LAZY_WRITER
 /* FIXME: Someday this could somewhat implement write-behind/read-ahead */
 VOID
 NTAPI
@@ -378,6 +387,7 @@ CciLazyWriter(PVOID Unused)
         }
     }
 }
+#endif
 
 NTSTATUS
 CcRosTrimCache (
@@ -1334,7 +1344,9 @@ CcRosInitializeFileCache (
         SharedCacheMap->SectionSize = FileSizes->AllocationSize;
         SharedCacheMap->FileSize = FileSizes->FileSize;
         SharedCacheMap->PinAccess = PinAccess;
+#ifdef _WITH_LAZY_WRITER
         SharedCacheMap->DirtyPageThreshold = 0;
+#endif
         KeInitializeSpinLock(&SharedCacheMap->CacheMapLock);
         InitializeListHead(&SharedCacheMap->CacheMapVacbListHead);
         FileObject->SectionObjectPointer->SharedCacheMap = SharedCacheMap;
@@ -1370,6 +1382,7 @@ CcGetFileObjectFromSectionPtrs (
     return NULL;
 }
 
+#ifdef _WITH_LAZY_WRITER
 VOID
 NTAPI
 CcShutdownLazyWriter (
@@ -1378,6 +1391,7 @@ CcShutdownLazyWriter (
     /* Simply set the event, lazy writer will stop when it's done */
     KeSetEvent(&iLazyWriterShutdown, IO_DISK_INCREMENT, FALSE);
 }
+#endif
 
 BOOLEAN
 INIT_FUNCTION
@@ -1385,17 +1399,21 @@ NTAPI
 CcInitView (
     VOID)
 {
+#ifdef _WITH_LAZY_WRITER
     HANDLE LazyWriter;
     NTSTATUS Status;
     KPRIORITY Priority;
     OBJECT_ATTRIBUTES ObjectAttributes;
+#endif
 
     DPRINT("CcInitView()\n");
 
     InitializeListHead(&DirtyVacbListHead);
     InitializeListHead(&VacbLruListHead);
+#ifdef _WITH_LAZY_WRITER
     InitializeListHead(&CcDeferredWrites);
     KeInitializeSpinLock(&CcDeferredWriteSpinLock);
+#endif
     KeInitializeGuardedMutex(&ViewLock);
     ExInitializeNPagedLookasideList(&iBcbLookasideList,
                                     NULL,
@@ -1421,6 +1439,7 @@ CcInitView (
 
     MmInitializeMemoryConsumer(MC_CACHE, CcRosTrimCache);
 
+#ifdef _WITH_LAZY_WRITER
     /* Initialize lazy writer events */
     KeInitializeEvent(&iLazyWriterShutdown, SynchronizationEvent, FALSE);
     KeInitializeEvent(&iLazyWriterNotify, NotificationEvent, FALSE);
@@ -1468,6 +1487,7 @@ CcInitView (
 
     /* Handle is not needed */
     ObCloseHandle(LazyWriter, KernelMode);
+#endif
 
     CcInitCacheZeroPage();
 
diff --git a/ntoskrnl/include/internal/cc.h b/ntoskrnl/include/internal/cc.h
index 2699dfc..2388f4d 100644
--- a/ntoskrnl/include/internal/cc.h
+++ b/ntoskrnl/include/internal/cc.h
@@ -41,10 +41,14 @@
 //
 extern ULONG CcRosTraceLevel;
 extern LIST_ENTRY DirtyVacbListHead;
+#ifdef _WITH_LAZY_WRITER
 extern ULONG CcDirtyPageThreshold;
+#endif
 extern ULONG CcTotalDirtyPages;
+#ifdef _WITH_LAZY_WRITER
 extern LIST_ENTRY CcDeferredWrites;
 extern KSPIN_LOCK CcDeferredWriteSpinLock;
+#endif
 
 typedef struct _PF_SCENARIO_ID
 {
@@ -159,7 +163,9 @@ typedef struct _ROS_SHARED_CACHE_MAP
     PVOID LazyWriteContext;
     KSPIN_LOCK CacheMapLock;
     ULONG OpenCount;
+#ifdef _WITH_LAZY_WRITER
     ULONG DirtyPageThreshold;
+#endif
 #if DBG
     BOOLEAN Trace; /* enable extra trace output for this cache map and it's VACBs */
 #endif
@@ -198,6 +204,7 @@ typedef struct _ROS_VACB
     /* Pointer to the next VACB in a chain. */
 } ROS_VACB, *PROS_VACB;
 
+#ifdef _WITH_LAZY_WRITER
 typedef struct _ROS_DEFERRED_WRITE_CONTEXT
 {
     LIST_ENTRY CcDeferredWritesEntry;
@@ -208,6 +215,7 @@ typedef struct _ROS_DEFERRED_WRITE_CONTEXT
     ULONG BytesToWrite;
     BOOLEAN Retrying;
 } ROS_DEFERRED_WRITE_CONTEXT, *PROS_DEFERRED_WRITE_CONTEXT;
+#endif
 
 typedef struct _INTERNAL_BCB
 {
@@ -260,9 +268,11 @@ BOOLEAN
 NTAPI
 CcInitView(VOID);
 
+#ifdef _WITH_LAZY_WRITER
 VOID
 NTAPI
 CcShutdownLazyWriter(VOID);
+#endif
 
 NTSTATUS
 NTAPI
diff --git a/ntoskrnl/mm/mminit.c b/ntoskrnl/mm/mminit.c
index 7f756cb..7b5fad8 100644
--- a/ntoskrnl/mm/mminit.c
+++ b/ntoskrnl/mm/mminit.c
@@ -19,6 +19,11 @@
 
 VOID NTAPI MiInitializeUserPfnBitmap(VOID);
 
+#ifndef _WITH_LAZY_WRITER
+HANDLE MpwThreadHandle;
+KEVENT MpwThreadEvent;
+#endif
+
 BOOLEAN Mm64BitPhysicalAddress = FALSE;
 ULONG MmReadClusterSize;
 //
@@ -166,6 +171,78 @@ MiDbgDumpAddressSpace(VOID)
             "Non Paged Pool Expansion PTE Space");
 }
 
+#ifndef _WITH_LAZY_WRITER
+VOID
+NTAPI
+MmMpwThreadMain(PVOID Parameter)
+{
+    NTSTATUS Status;
+#ifndef NEWCC
+    ULONG PagesWritten;
+#endif
+    LARGE_INTEGER Timeout;
+
+    UNREFERENCED_PARAMETER(Parameter);
+
+    Timeout.QuadPart = -50000000;
+
+    for(;;)
+    {
+        Status = KeWaitForSingleObject(&MpwThreadEvent,
+                                       0,
+                                       KernelMode,
+                                       FALSE,
+                                       &Timeout);
+        if (!NT_SUCCESS(Status))
+        {
+            DbgPrint("MpwThread: Wait failed\n");
+            KeBugCheck(MEMORY_MANAGEMENT);
+            return;
+        }
+
+#ifndef NEWCC
+        PagesWritten = 0;
+
+        // XXX arty -- we flush when evicting pages or destorying cache
+        // sections.
+        CcRosFlushDirtyPages(128, &PagesWritten, FALSE, FALSE);
+#endif
+    }
+}
+
+NTSTATUS
+NTAPI
+INIT_FUNCTION
+MmInitMpwThread(VOID)
+{
+    KPRIORITY Priority;
+    NTSTATUS Status;
+    CLIENT_ID MpwThreadId;
+
+    KeInitializeEvent(&MpwThreadEvent, SynchronizationEvent, FALSE);
+
+    Status = PsCreateSystemThread(&MpwThreadHandle,
+                                  THREAD_ALL_ACCESS,
+                                  NULL,
+                                  NULL,
+                                  &MpwThreadId,
+                                  MmMpwThreadMain,
+                                  NULL);
+    if (!NT_SUCCESS(Status))
+    {
+        return(Status);
+    }
+
+    Priority = 27;
+    NtSetInformationThread(MpwThreadHandle,
+                           ThreadPriority,
+                           &Priority,
+                           sizeof(Priority));
+
+    return(STATUS_SUCCESS);
+}
+#endif
+
 NTSTATUS
 NTAPI
 INIT_FUNCTION
@@ -268,6 +345,13 @@ MmInitSystem(IN ULONG Phase,
     /* Initialize the balance set manager */
     MmInitBsmThread();
 
+#ifndef _WITH_LAZY_WRITER
+    /*
+     * Initialise the modified page writer.
+     */
+    MmInitMpwThread();
+#endif
+
     return TRUE;
 }
 
