mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shantanu Goel <sgoel01@yahoo.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [VM PATCH 2.6.8-rc1] Prevent excessive scanning of lower zone
Date: Wed, 4 Aug 2004 17:02:05 -0700 (PDT)	[thread overview]
Message-ID: <20040805000205.53959.qmail@web12823.mail.yahoo.com> (raw)
In-Reply-To: <20040722220701.7de4c31f.akpm@osdl.org>

[-- Attachment #1: Type: text/plain, Size: 1092 bytes --]

Hi Andrew,

--- Andrew Morton <akpm@osdl.org> wrote:

> Shantanu Goel <sgoel01@yahoo.com> wrote:
> >
> > I emailed this a few weeks back to the list but it
> > seems to have gotten lost...
> 
> It came through.  I was unable to reproduce the
> disproportional scanning
> rate on almost exactly the same setup, so I parked
> the problem for a while.
> 
> I do agree with the analysis though.  The problem
> _could_ occur.  I dunno
> why it happens for you and not for me...
> 

Actually, the analysis turned out to be not entirely
correct.  I think I have identified the offending
code.  Please see attached patch.  It makes kswapd()
skip zones which contain greater than "pages_high"
pages.

Machine setup is the same as before.
2x2.0Ghz Xeon w/HT, memory 256M (manually pegged).
I see this lopsided lower zone scanning on a dual
Opteron machine as well.

Attached are the kernbench results for stock 2.6.8-rc1
and 2.6.8-rc1 with patch.

Thanks,
Shantanu


		
__________________________________
Do you Yahoo!?
Y! Messenger - Communicate in real time. Download now. 
http://messenger.yahoo.com

[-- Attachment #2: vm.patch --]
[-- Type: application/octet-stream, Size: 455 bytes --]

--- .orig/mm/vmscan.c	2004-08-04 19:56:41.000000000 -0400
+++ 2.6.8-rc1-vmfix/mm/vmscan.c	2004-08-04 18:45:44.000000000 -0400
@@ -1037,8 +1037,9 @@
 				continue;
 
 			if (nr_pages == 0) {	/* Not software suspend */
-				if (zone->free_pages <= zone->pages_high)
-					all_zones_ok = 0;
+				if (zone->free_pages > zone->pages_high)
+					continue;
+				all_zones_ok = 0;
 			}
 			zone->temp_priority = priority;
 			if (zone->prev_priority > priority)

[-- Attachment #3: kb-2.6.8-rc1 --]
[-- Type: application/octet-stream, Size: 1898 bytes --]

4 cpus found
Cleaning source tree...
Making defconfig...
Making dep if needed...
Caching kernel source in ram...
Half load is 2 jobs, changing to 3 as a kernel compile won't guarantee 2 jobs

Performing 5 runs of
make -j 16

Warmup optimal load run...
Optimal load -j16 run number 1...
Optimal load -j16 run number 2...
Optimal load -j16 run number 3...
Optimal load -j16 run number 4...
Optimal load -j16 run number 5...

Average Optimal -j 16 Load Run:
Elapsed Time 216.838
User Time 687.224
System Time 65.028
Percent CPU 346.8
Context Switches 59434.4
Sleeps 49148

----
pgfault                       32319468
pgfree                        20602514
pgalloc_normal                19978414
pgrefill_normal               5721256
pgpgout                       2527928
pgpgin                        1793728
pgdeactivate                  1303311
pgrefill_dma                  762328
pgalloc_dma                   625244
pgscan_kswapd_normal          599511
pgsteal_normal                513219
pswpout                       509043
pgrotated                     505673
pgscan_direct_normal          464871
pgactivate                    414917
pgscan_kswapd_dma             373563
kswapd_steal                  342353
slabs_scanned                 267429
pswpin                        221967
pgscan_direct_dma             173806
pgsteal_dma                   126828
pgmajfault                    91201
allocstall                    6402
nr_dirty                      6343
pageoutrun                    2264
kswapd_inodesteal             1517
nr_slab                       920
pginodesteal                  849
nr_page_table_pages           3
pgsteal_high                  0
pgalloc_high                  0
pgscan_kswapd_high            0
pgscan_direct_high            0
pgrefill_high                 0
nr_unstable                   0
nr_writeback                  0
nr_mapped                     -5900

[-- Attachment #4: kb-2.6.8-rc1-vmfix-latest10 --]
[-- Type: application/octet-stream, Size: 1889 bytes --]

4 cpus found
Cleaning source tree...
Making defconfig...
Making dep if needed...
Caching kernel source in ram...
Half load is 2 jobs, changing to 3 as a kernel compile won't guarantee 2 jobs

Performing 5 runs of
make -j 16

Warmup optimal load run...
Optimal load -j16 run number 1...
Optimal load -j16 run number 2...
Optimal load -j16 run number 3...
Optimal load -j16 run number 4...
Optimal load -j16 run number 5...

Average Optimal -j 16 Load Run:
Elapsed Time 209.66
User Time 689.81
System Time 65.622
Percent CPU 360
Context Switches 59796.2
Sleeps 47081.6

----
pgfault                       32248388
pgfree                        20661083
pgalloc_normal                20133252
pgrefill_normal               6387375
pgpgout                       2115520
pgpgin                        1899772
pgdeactivate                  1311049
pgscan_kswapd_normal          678876
pgsteal_normal                628547
pgscan_direct_normal          610731
pgalloc_dma                   515435
pgactivate                    430166
pswpout                       405577
pgrotated                     403614
pgrefill_dma                  400656
kswapd_steal                  316774
slabs_scanned                 290366
pswpin                        213565
pgmajfault                    85829
pgscan_direct_dma             59142
pgsteal_dma                   22615
allocstall                    7321
nr_dirty                      6064
pageoutrun                    2731
kswapd_inodesteal             318
pginodesteal                  191
nr_page_table_pages           3
pgsteal_high                  0
pgalloc_high                  0
pgscan_kswapd_high            0
pgscan_kswapd_dma             0
pgscan_direct_high            0
pgrefill_high                 0
nr_unstable                   0
nr_writeback                  0
nr_slab                       -291
nr_mapped                     -9990

  parent reply	other threads:[~2004-08-05  0:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-23  1:40 Shantanu Goel
2004-07-23  5:07 ` Andrew Morton
2004-07-23  2:26   ` Shantanu Goel
2004-07-23  3:43   ` Nick Piggin
2004-08-05  0:02   ` Shantanu Goel [this message]
2004-08-06  4:38     ` Nick Piggin

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=20040805000205.53959.qmail@web12823.mail.yahoo.com \
    --to=sgoel01@yahoo.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®