Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261515AbVACR32 (ORCPT ); Mon, 3 Jan 2005 12:29:28 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261524AbVACR1I (ORCPT ); Mon, 3 Jan 2005 12:27:08 -0500 Received: from mx1.redhat.com ([66.187.233.31]:32746 "EHLO mx1.redhat.com") by vger.kernel.org with ESMTP id S261518AbVACR0N (ORCPT ); Mon, 3 Jan 2005 12:26:13 -0500 Date: Mon, 3 Jan 2005 12:25:53 -0500 (EST) From: Rik van Riel X-X-Sender: riel@chimarrao.boston.redhat.com To: Andrew Morton cc: linux-kernel@vger.kernel.org, Andrea Arcangeli , Marcelo Tosatti Subject: [PATCH][5/?] count writeback pages in nr_scanned Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1016 Lines: 29 Still untested, but posting the concept here anyway, since this could explain a lot... OOM kills have been observed with 70% of the pages in lowmem being in the writeback state. If we count those pages in sc->nr_scanned, the VM should throttle and wait for IO completion, instead of OOM killing. Signed-off-by: Rik van Riel --- linux-2.6.9/mm/vmscan.c.screclaim 2005-01-03 12:17:56.547148905 -0500 +++ linux-2.6.9/mm/vmscan.c 2005-01-03 12:18:16.855965416 -0500 @@ -376,10 +376,10 @@ BUG_ON(PageActive(page)); + sc->nr_scanned++; if (PageWriteback(page)) goto keep_locked; - sc->nr_scanned++; /* Double the slab pressure for mapped and swapcache pages */ if (page_mapped(page) || PageSwapCache(page)) sc->nr_scanned++; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/