public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: William Lee Irwin III <wli@holomorphy.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [oom]: [0/4] fix OOM deadlock running OAST
Date: Wed, 23 Jun 2004 18:07:22 -0700	[thread overview]
Message-ID: <20040623180722.69a8ea6f.akpm@osdl.org> (raw)
In-Reply-To: <20040624003249.GM1552@holomorphy.com>

William Lee Irwin III <wli@holomorphy.com> wrote:
>
> On Wed, Jun 23, 2004 at 05:26:51PM -0700, William Lee Irwin III wrote:
> > Then it sounds like the smaller fix below may be better for you.
> 
> Also, as we're fixing this a different way, could you clarify for me
> which of the pieces of the original fix or related things (e.g. the
> zone->all_unreclaimable stuff, yanking PG_wired stuff off the LRU,
> maybe more) you wanted me to rework and send back in later?
> 

Well none, really.  This problem is now fixed, is it not?

It would be nice to fix up the unrelated issue of putting unbacked pages
onto the LRU.  Could do that by adding backing_dev_info.not_on_lru, check
that in the various places where we add pages to the LRU.


Or, conceivably, do it lazily: take these pages off the LRU if we encounter
them in page reclaim.  This might be a net win - do extra work for the rare
case, less work for the common case.

Something like this:

--- 25/mm/vmscan.c~a	2004-06-23 18:05:19.738648736 -0700
+++ 25-akpm/mm/vmscan.c	2004-06-23 18:06:00.386469328 -0700
@@ -367,6 +367,17 @@ static int shrink_list(struct list_head 
 		if (page_mapped(page) || PageSwapCache(page))
 			sc->nr_scanned++;
 
+		mapping = page_mapping(page);
+
+		if (mapping && mapping->backing_dev_info->not_on_lru) {
+			/*
+			 * comment goes here
+			 */
+			unlock_page(page);
+			page_cache_release(page);
+			continue;
+		}
+
 		page_map_lock(page);
 		referenced = page_referenced(page);
 		if (referenced && page_mapping_inuse(page)) {
@@ -386,11 +397,11 @@ static int shrink_list(struct list_head 
 			page_map_unlock(page);
 			if (!add_to_swap(page))
 				goto activate_locked;
+			mapping = page_mapping(page);
 			page_map_lock(page);
 		}
 #endif /* CONFIG_SWAP */
 
-		mapping = page_mapping(page);
 		may_enter_fs = (sc->gfp_mask & __GFP_FS) ||
 			(PageSwapCache(page) && (sc->gfp_mask & __GFP_IO));
 
_


  reply	other threads:[~2004-06-24  1:08 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-23 21:07 [oom]: [0/4] fix OOM deadlock running OAST William Lee Irwin III
2004-06-23 21:07 ` [oom]: [1/4] add __GFP_WIRED to pinned allocations William Lee Irwin III
2004-06-23 21:07   ` [oom]: [2/4] add nr_wired to page_state William Lee Irwin III
2004-06-23 21:07     ` [oom]: [3/4] track wired pages on a per-zone basis William Lee Irwin III
2004-06-23 21:07       ` [oom]: [4/4] check __GFP_WIRED in out_of_memory() William Lee Irwin III
2004-06-23 21:29       ` [oom]: [3/4] track wired pages on a per-zone basis William Lee Irwin III
2004-06-23 22:15       ` Andrew Morton
2004-06-23 22:28         ` William Lee Irwin III
2004-06-23 22:05   ` [oom]: [1/4] add __GFP_WIRED to pinned allocations Andrew Morton
2004-06-23 22:22     ` William Lee Irwin III
2004-06-23 22:36       ` Andrew Morton
2004-06-23 22:16 ` [oom]: [0/4] fix OOM deadlock running OAST Andrew Morton
2004-06-23 22:31   ` William Lee Irwin III
2004-06-23 22:37     ` Andrew Morton
2004-06-23 23:07       ` William Lee Irwin III
2004-06-23 23:38         ` Andrew Morton
2004-06-24  0:03           ` William Lee Irwin III
2004-06-24  0:18             ` Andrew Morton
2004-06-24  0:26               ` William Lee Irwin III
2004-06-24  0:32                 ` William Lee Irwin III
2004-06-24  1:07                   ` Andrew Morton [this message]
2004-06-24  1:24                     ` William Lee Irwin III
2004-06-24  1:52                       ` William Lee Irwin III
2004-06-24  2:01                         ` Andrew Morton
2004-06-24  2:15                           ` William Lee Irwin III
2004-06-24 14:16                 ` Marcelo Tosatti
2004-06-24 15:18                   ` William Lee Irwin III
2004-06-24 15:19                     ` William Lee Irwin III
2004-06-24 15:23                   ` William Lee Irwin III
2004-06-24 16:55                     ` Marcelo Tosatti
2004-06-25 15:18         ` Rik van Riel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040623180722.69a8ea6f.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wli@holomorphy.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox