Skip to contentSkip to conversation

readahead02: change the test pass to 2M

LTP Madan 2 participants 2 messages May 9, 2014

lore
Share & tools
lore

Madan

author
#0 lore raw

Max readahead size has been limited since commit:
commit 6d2be915e589b58cb11418cbe1f22ff90732b6ac
Author: Raghavendra K T<[email protected]>
Date: Thu Apr 3 14:48:23 2014 -0700
mm/readahead.c: fix readahead failure for memoryless NUMA nodes
and limit readahead pages

Updating the change in the readahead behaviour of max 2M cache.
http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/?id=c7252018cef0da5db35cd03aa7b6c44ab597a0b7

Patch :

testcases/kernel/syscalls/readahead/readahead02.c +4 -3
index 66158f0..dc6a191 100644
@@ -306,13 +306,14 @@ static void test_readahead(void)
         tst_resm(TINFO, "cache can hold at least: %ld kB", cached_max);
         tst_resm(TINFO, "read_testfile(0) used cache: %ld kB", cached);
         tst_resm(TINFO, "read_testfile(1) used cache: %ld kB", cached_ra);
-
-       if (cached_max * 1024 >= testfile_size) {
+
+        /* readahead will cache max of 2 M */
+       if (cached_max * 1024 >= 2 * 1024) {
                 /*
                  * if cache can hold ~testfile_size then cache increase
                  * for readahead should be at least testfile_size/2
                  */
-               if (cached_ra * 1024 > testfile_size / 2)
+               if (cached_ra * 1024 > 2 * 1024)
                         tst_resm(TPASS, "using cache as expected");
                 else
                         tst_resm(TWARN, "using less cache than expected");

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#1 lore raw

----- Original Message -----

Quoted 12 lines

From: "Madan" <[email protected]>
To: [email protected]
Sent: Friday, 9 May, 2014 7:45:49 AM
Subject: [LTP] readahead02: change the test pass to 2M

Max readahead size has been limited since commit:
commit 6d2be915e589b58cb11418cbe1f22ff90732b6ac
Author: Raghavendra K T<[email protected]>
Date: Thu Apr 3 14:48:23 2014 -0700
mm/readahead.c: fix readahead failure for memoryless NUMA nodes
and limit readahead pages

Quoted 4 lines

Updating the change in the readahead behaviour of max 2M cache.
http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/?id=c7252018cef0da5db35cd03aa7b6c44ab597a0b7

I posted a similar patch:
http://article.gmane.org/gmane.linux.ltp/20466
which keeps sizes, but makes multiple readahead calls.

Regards,
Jan

Quoted 31 lines

Patch :

testcases/kernel/syscalls/readahead/readahead02.c +4 -4
index 66158f0..dc6a191 100644
@@ -306,13 +306,14 @@ static void test_readahead(void)
         tst_resm(TINFO, "cache can hold at least: %ld kB", cached_max);
         tst_resm(TINFO, "read_testfile(0) used cache: %ld kB", cached);
         tst_resm(TINFO, "read_testfile(1) used cache: %ld kB", cached_ra);
-
-       if (cached_max * 1024 >= testfile_size) {
+
+        /* readahead will cache max of 2 M */
+       if (cached_max * 1024 >= 2 * 1024) {
                 /*
                  * if cache can hold ~testfile_size then cache increase
                  * for readahead should be at least testfile_size/2
                  */
-               if (cached_ra * 1024 > testfile_size / 2)
+               if (cached_ra * 1024 > 2 * 1024)
                         tst_resm(TPASS, "using cache as expected");
                 else
                         tst_resm(TWARN, "using less cache than expected");
 
 
 
------------------------------------------------------------------------------

Is your legacy SCM system holding you back? Join Perforce May 7 to find out:

Quoted 9 lines

&#149; 3 signs your SCM is hindering your productivity &#149; Requirements for releasing software faster &#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Ltp-list mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list