linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Andrew Morton <akpm@osdl.org>
Cc: marcelo.tosatti@cyclades.com, clameter@engr.sgi.com, linux-mm@kvack.org
Subject: Re: Get rid of scan_control
Date: Sun, 12 Feb 2006 14:33:39 +1100	[thread overview]
Message-ID: <43EEAC93.3000803@yahoo.com.au> (raw)
In-Reply-To: <20060211014649.7cb3b9e2.akpm@osdl.org>

Andrew Morton wrote:
> Andrew Morton <akpm@osdl.org> wrote:
> 
>>I found that scan_control wasn't
>> really a success.  We had one bug due to failing to initialise something in
>> it, and we're fiddling with fields all over the place.  It just seemed to
>> obfuscate the code, make it harder to work with, harder to check that
>> everything was correct.
> 

I agree with Marcelo, I prefer scan_control. I'm not sure if it was
modelled on writeback_control or not, but it is certianly very different:
writeback_control is spread over many files and subsystems. scan_control
is vmscan local and is simply used to alleviate the passing of many
values back and forth between vmscan functions.

> 
> I spose we could do this, which is a bit of an improvement.
> 
> But the problems do remain, really.  The one which creeps me out is looking
> at a piece of code which does:
> 
> 
> 	foo(&sc);
> 	if (sc.bar ...)
> 
> and just not knowing whether foo() altered sc.bar.
> 

Luckily there are very limited call stacks which modify this stuff so it isn't
too hard to keep all in your head at once after you start doing a bit of work
in vmscan. That said, we could implement a commenting convention to help things.

/*
  * refill_inactive_list
  * input:
  * sc.nr_scan - specifies the number of ...
  * sc.blah ...
  *
  * modifies:
  * sc.nr_scan - blah blah
  */

?

-- 
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2006-02-12  3:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-10  5:02 Christoph Lameter
2006-02-11  4:53 ` Marcelo Tosatti
2006-02-11  9:32   ` Andrew Morton
2006-02-11  9:46     ` Andrew Morton
2006-02-12  3:33       ` Nick Piggin [this message]
2006-02-12  3:47         ` Christoph Lameter
2006-02-12  4:08           ` Nick Piggin
2006-02-12  4:41             ` Christoph Lameter
2006-02-12  5:01               ` Nick Piggin
2006-02-12  5:14                 ` Andrew Morton
2006-02-12  5:37                   ` Andrew Morton
2006-02-12  6:49                     ` Christoph Lameter
2006-02-12  7:53                       ` Andrew Morton
2006-02-13 17:54                         ` Christoph Lameter
2006-02-12  6:25                 ` Christoph Lameter
2006-02-11 19:01     ` Christoph Lameter
2006-02-11 21:13       ` Andrew Morton
2006-02-11 21:27         ` Christoph Lameter

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=43EEAC93.3000803@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=akpm@osdl.org \
    --cc=clameter@engr.sgi.com \
    --cc=linux-mm@kvack.org \
    --cc=marcelo.tosatti@cyclades.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