linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vincent Li <macli@brc.ubc.ca>
To: Minchan Kim <minchan.kim@gmail.com>
Cc: Vincent Li <macli@brc.ubc.ca>, Mel Gorman <mel@csn.ul.ie>,
	Andrew Morton <akpm@linux-foundation.org>,
	kosaki.motohiro@jp.fujitsu.com, riel@redhat.com,
	fengguang.wu@intel.com, linux-mm@kvack.org
Subject: Re: [RESEND][PATCH V1] mm/vsmcan: check shrink_active_list() sc->isolate_pages() return value.
Date: Thu, 15 Oct 2009 16:13:08 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.00.0910151607160.10149@kernalhack.brc.ubc.ca> (raw)
In-Reply-To: <alpine.DEB.2.00.0910151507260.2882@kernalhack.brc.ubc.ca>



On Thu, 15 Oct 2009, Vincent Li wrote:

> 
> 
> On Wed, 9 Sep 2009, Minchan Kim wrote:
> 
> > 
> > You're right. the experiment said so.
> > But hackbench performs fork-bomb test
> > so that it makes corner case, I think.
> > Such a case shows the your patch is good.
> > But that case is rare.
> > 
> > The thing remained is to test your patch
> > in normal case. so you need to test hackbench with
> > smaller parameters to make for the number of task
> > to fit your memory size but does happen reclaim.
> > 
> 
> Hi Kim,
> 
> I finally got some time to rerun the perf test and press Alt + SysRq + M the
> same time  on a freshly start computer.
> 
> I run the perf with repeat only 1 instead of 5, so run hackbench with number
> 100 does not cause my system stall, the system  is still quite responsive
> during the test, I assume that is normal situation, not fork bomb case?
> 
> In general, it seems nr_taken_zero does happen in normal page reclaim
> situation, but it is also true that nr_taken_zero does not happen from time to
> time.
> 

Oh, The nr_taken_zero/nonzero event tracing test patch is based on 
2.6.32-rc4 as below:

---
diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h
index eaf46bd..a94daa0 100644
--- a/include/trace/events/kmem.h
+++ b/include/trace/events/kmem.h
@@ -388,6 +388,42 @@ TRACE_EVENT(mm_page_alloc_extfrag,
 		__entry->alloc_migratetype == __entry->fallback_migratetype)
 );
 
+TRACE_EVENT(mm_vmscan_nr_taken_zero,
+
+	TP_PROTO(unsigned long nr_taken),
+
+	TP_ARGS(nr_taken),
+
+	TP_STRUCT__entry(
+		__field(        unsigned long,          nr_taken        )
+	),
+
+	TP_fast_assign(
+		__entry->nr_taken       = nr_taken;
+	),
+
+	TP_printk("nr_taken=%lu",
+		__entry->nr_taken)
+);
+
+TRACE_EVENT(mm_vmscan_nr_taken_nonzero,
+
+	TP_PROTO(unsigned long nr_taken),
+
+	TP_ARGS(nr_taken),
+
+	TP_STRUCT__entry(
+		__field(        unsigned long,          nr_taken        )
+	),
+
+	TP_fast_assign(
+		__entry->nr_taken       = nr_taken;
+	),
+
+	TP_printk("nr_taken=%lu",
+		__entry->nr_taken)
+);
+
 #endif /* _TRACE_KMEM_H */
 
 /* This part must be outside protection */
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 64e4388..36e7fe2 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1326,6 +1326,12 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
 	reclaim_stat->recent_scanned[file] += nr_taken;
 
 	__count_zone_vm_events(PGREFILL, zone, pgscanned);
+
+	if (nr_taken == 0)
+		trace_mm_vmscan_nr_taken_zero(nr_taken);
+	else
+		trace_mm_vmscan_nr_taken_nonzero(nr_taken);
+
 	if (file)
 		__mod_zone_page_state(zone, NR_ACTIVE_FILE, -nr_taken);
 	else


Regards,

Vincent

--
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:[~2009-10-15 23:13 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-02 23:49 Vincent Li
2009-09-03 21:06 ` Andrew Morton
2009-09-03 22:02   ` Vincent Li
2009-09-03 22:47     ` Andrew Morton
2009-09-04 21:39       ` Vincent Li
2009-09-04 23:53         ` Andrew Morton
2009-09-08 13:21           ` Mel Gorman
2009-09-08 22:39             ` Vincent Li
2009-09-08 23:27               ` Minchan Kim
2009-10-15 22:47                 ` Vincent Li
2009-10-15 23:13                   ` Vincent Li [this message]
2009-10-16  2:10                   ` Minchan Kim
2009-10-16  2:20                     ` Wu Fengguang
2009-10-16  3:05                       ` KOSAKI Motohiro
2009-10-16  3:26                         ` Vincent Li
2009-11-26  4:56                         ` KOSAKI Motohiro
2009-09-09  9:59               ` Mel Gorman
2009-09-04  1:37   ` Minchan Kim
2009-09-04  2:01     ` Andrew Morton
2009-09-04  5:01       ` Vincent Li
2009-09-04 16:05         ` Vincent Li
2009-09-06 23:38           ` KOSAKI Motohiro
2009-09-08 18:32             ` Vincent Li
2009-09-08 23:47               ` KOSAKI Motohiro
2009-09-09 12:04               ` Johannes Weiner
2009-09-09 13:22                 ` Minchan Kim
2009-09-22 21:02 ` Andrew Morton
2009-09-22 23:01   ` Vincent Li

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=alpine.DEB.2.00.0910151607160.10149@kernalhack.brc.ubc.ca \
    --to=macli@brc.ubc.ca \
    --cc=akpm@linux-foundation.org \
    --cc=fengguang.wu@intel.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=minchan.kim@gmail.com \
    --cc=riel@redhat.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