All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Stephen C. Tweedie" <sct@redhat.com>
To: Rik van Riel <H.H.vanRiel@phys.uu.nl>
Cc: "Stephen C. Tweedie" <sct@redhat.com>, Linux MM <linux-mm@kvack.org>
Subject: Re: rw_swap_page() and swapin readahead
Date: Wed, 25 Nov 1998 23:08:01 GMT	[thread overview]
Message-ID: <199811252308.XAA05815@dax.scot.redhat.com> (raw)
In-Reply-To: <Pine.LNX.3.96.981125235645.17460B-100000@mirkwood.dummy.home>

Hi,

On Wed, 25 Nov 1998 23:59:17 +0100 (CET), Rik van Riel
<H.H.vanRiel@phys.uu.nl> said:

> On Wed, 25 Nov 1998, Stephen C. Tweedie wrote:
>> 
>> The PG_free_after bit is there only to mark that increment, so that
>> the page count is decremented again (asynchronously) once the IO is
>> complete and no sooner. 

> Then what does the PG_decr_after do? It seems like there
> are two flags to do the same thing... I'm curious :)

It's in fs/buffer.c, after_unlock_page:

	if (test_and_clear_bit(PG_decr_after, &page->flags))
		atomic_dec(&nr_async_pages);
	if (test_and_clear_bit(PG_swap_unlock_after, &page->flags))
		swap_after_unlock_page(page->offset);
	if (test_and_clear_bit(PG_free_after, &page->flags))
		__free_page(page);

So PG_free_after causes us to decrement the page count after IO;
PG_decr_after decrements the global async page IO count (the one which
stops us doing runaway async swapout), andd PG_swap_unlock_after unlocks
the swap map after the IO.

--Stephen
--
This is a majordomo managed list.  To unsubscribe, send a message with
the body 'unsubscribe linux-mm me@address' to: majordomo@kvack.org

      reply	other threads:[~1998-11-25 23:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-25 22:02 rw_swap_page() and swapin readahead Rik van Riel
1998-11-25 22:19 ` Stephen C. Tweedie
1998-11-25 22:59   ` Rik van Riel
1998-11-25 23:08     ` Stephen C. Tweedie [this message]

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=199811252308.XAA05815@dax.scot.redhat.com \
    --to=sct@redhat.com \
    --cc=H.H.vanRiel@phys.uu.nl \
    --cc=linux-mm@kvack.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.