public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Karim Yaghmour <karim@opersys.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	LTT-Dev <ltt-dev@shafik.org>
Subject: [PATCH 6/8 ] ltt for 2.6.10 : mm/ events
Date: Fri, 14 Jan 2005 01:11:27 -0500	[thread overview]
Message-ID: <41E7628F.8040902@opersys.com> (raw)


signed-off-by: Karim Yaghmour (karim@opersys.com)

--- linux-2.6.10-relayfs/mm/filemap.c	2004-12-24 16:35:50.000000000 -0500
+++ linux-2.6.10-relayfs-ltt/mm/filemap.c	2005-01-13 22:21:51.000000000 -0500
@@ -28,6 +28,7 @@
 #include <linux/blkdev.h>
 #include <linux/security.h>
 #include <linux/syscalls.h>
+#include <linux/ltt-events.h>
 /*
  * This is needed for the following functions:
  *  - try_to_release_page
@@ -402,9 +403,13 @@ void fastcall wait_on_page_bit(struct pa
 {
 	DEFINE_WAIT_BIT(wait, &page->flags, bit_nr);

+	ltt_ev_memory(LTT_EV_MEMORY_PAGE_WAIT_START, 0);
+
 	if (test_bit(bit_nr, &page->flags))
 		__wait_on_bit(page_waitqueue(page), &wait, sync_page,
 							TASK_UNINTERRUPTIBLE);
+
+	ltt_ev_memory(LTT_EV_MEMORY_PAGE_WAIT_END, 0);
 }
 EXPORT_SYMBOL(wait_on_page_bit);

--- linux-2.6.10-relayfs/mm/memory.c	2004-12-24 16:34:44.000000000 -0500
+++ linux-2.6.10-relayfs-ltt/mm/memory.c	2005-01-13 22:21:51.000000000 -0500
@@ -47,6 +47,9 @@
 #include <linux/module.h>
 #include <linux/init.h>

+#include <linux/module.h>
+#include <linux/ltt-events.h>
+
 #include <asm/pgalloc.h>
 #include <asm/uaccess.h>
 #include <asm/tlb.h>
@@ -1346,6 +1349,7 @@ static int do_swap_page(struct mm_struct
 	spin_unlock(&mm->page_table_lock);
 	page = lookup_swap_cache(entry);
 	if (!page) {
+	        ltt_ev_memory(LTT_EV_MEMORY_SWAP_IN, address);
  		swapin_readahead(entry, address, vma);
  		page = read_swap_cache_async(entry, vma, address);
 		if (!page) {
--- linux-2.6.10-relayfs/mm/page_alloc.c	2004-12-24 16:33:51.000000000 -0500
+++ linux-2.6.10-relayfs-ltt/mm/page_alloc.c	2005-01-13 22:21:51.000000000 -0500
@@ -32,6 +32,7 @@
 #include <linux/sysctl.h>
 #include <linux/cpu.h>
 #include <linux/nodemask.h>
+#include <linux/ltt-events.h>

 #include <asm/tlbflush.h>

@@ -278,6 +279,8 @@ void __free_pages_ok(struct page *page,
 	LIST_HEAD(list);
 	int i;

+	ltt_ev_memory(LTT_EV_MEMORY_PAGE_FREE, order);
+
 	arch_free_page(page, order);

 	mod_page_state(pgfree, 1 << order);
@@ -752,6 +755,7 @@ fastcall unsigned long __get_free_pages(
 	page = alloc_pages(gfp_mask, order);
 	if (!page)
 		return 0;
+	ltt_ev_memory(LTT_EV_MEMORY_PAGE_ALLOC, order);
 	return (unsigned long) page_address(page);
 }

--- linux-2.6.10-relayfs/mm/page_io.c	2004-12-24 16:33:59.000000000 -0500
+++ linux-2.6.10-relayfs-ltt/mm/page_io.c	2005-01-13 22:21:51.000000000 -0500
@@ -17,6 +17,7 @@
 #include <linux/bio.h>
 #include <linux/swapops.h>
 #include <linux/writeback.h>
+#include <linux/ltt-events.h>
 #include <asm/pgtable.h>

 static struct bio *get_swap_bio(int gfp_flags, pgoff_t index,
@@ -103,6 +104,7 @@ int swap_writepage(struct page *page, st
 	inc_page_state(pswpout);
 	set_page_writeback(page);
 	unlock_page(page);
+	ltt_ev_memory(LTT_EV_MEMORY_SWAP_OUT, (unsigned long) page);
 	submit_bio(rw, bio);
 out:
 	return ret;



                 reply	other threads:[~2005-01-14  6:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=41E7628F.8040902@opersys.com \
    --to=karim@opersys.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ltt-dev@shafik.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