* [LTP] [PATCH 1/2] readahead02: fix signed/unsigned comparison warnings
@ 2014-04-22 8:37 Jan Stancek
2014-04-22 8:37 ` [LTP] [PATCH 2/2] readahead02: read in 2M chunks Jan Stancek
0 siblings, 1 reply; 7+ messages in thread
From: Jan Stancek @ 2014-04-22 8:37 UTC (permalink / raw)
To: ltp-list
Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
testcases/kernel/syscalls/readahead/readahead02.c | 22 +++++++++++---------
1 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/testcases/kernel/syscalls/readahead/readahead02.c b/testcases/kernel/syscalls/readahead/readahead02.c
index 66158f0..8940821 100644
--- a/testcases/kernel/syscalls/readahead/readahead02.c
+++ b/testcases/kernel/syscalls/readahead/readahead02.c
@@ -120,7 +120,7 @@ static void drop_caches(void)
}
}
-static long parse_entry(const char *fname, const char *entry)
+static unsigned long parse_entry(const char *fname, const char *entry)
{
FILE *f;
long value = -1;
@@ -140,17 +140,17 @@ static long parse_entry(const char *fname, const char *entry)
return value;
}
-static long get_bytes_read(void)
+static unsigned long get_bytes_read(void)
{
char fname[128];
- char entry[] = "read_bytes: %ld";
+ char entry[] = "read_bytes: %lu";
sprintf(fname, "/proc/%u/io", getpid());
return parse_entry(fname, entry);
}
-static long get_cached_size(void)
+static unsigned long get_cached_size(void)
{
- char entry[] = "Cached: %ld";
+ char entry[] = "Cached: %lu";
return parse_entry(meminfo_fname, entry);
}
@@ -158,7 +158,7 @@ static void create_testfile(void)
{
FILE *f;
char *tmp;
- int i;
+ size_t i;
tst_resm(TINFO, "creating test file of size: %ld", testfile_size);
tmp = SAFE_MALLOC(cleanup, pagesize);
@@ -197,9 +197,11 @@ static void create_testfile(void)
* @cached: returns cached kB from /proc/meminfo
*/
static void read_testfile(int do_readahead, const char *fname, size_t fsize,
- long *read_bytes, long *usec, long *cached)
+ unsigned long *read_bytes, long *usec,
+ unsigned long *cached)
{
- int fd, i;
+ int fd;
+ size_t i;
long read_bytes_start;
unsigned char *p, tmp;
unsigned long time_start_usec, time_end_usec;
@@ -261,9 +263,9 @@ static void read_testfile(int do_readahead, const char *fname, size_t fsize,
static void test_readahead(void)
{
- long read_bytes, read_bytes_ra;
+ unsigned long read_bytes, read_bytes_ra;
long usec, usec_ra;
- long cached_max, cached_low, cached, cached_ra;
+ unsigned long cached_max, cached_low, cached, cached_ra;
char proc_io_fname[128];
sprintf(proc_io_fname, "/proc/%u/io", getpid());
--
1.7.1
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [LTP] [PATCH 2/2] readahead02: read in 2M chunks
2014-04-22 8:37 [LTP] [PATCH 1/2] readahead02: fix signed/unsigned comparison warnings Jan Stancek
@ 2014-04-22 8:37 ` Jan Stancek
2014-05-13 5:18 ` Madan
2014-05-15 11:47 ` chrubis
0 siblings, 2 replies; 7+ messages in thread
From: Jan Stancek @ 2014-04-22 8:37 UTC (permalink / raw)
To: ltp-list
Max readahead size has been limited since commit:
commit 6d2be915e589b58cb11418cbe1f22ff90732b6ac
Author: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
Date: Thu Apr 3 14:48:23 2014 -0700
mm/readahead.c: fix readahead failure for memoryless NUMA nodes
and limit readahead pages
Update testcase to read ahead in 2M chunks, this change is
compatible with older kernels.
Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
testcases/kernel/syscalls/readahead/readahead02.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/testcases/kernel/syscalls/readahead/readahead02.c b/testcases/kernel/syscalls/readahead/readahead02.c
index 8940821..5b1524e 100644
--- a/testcases/kernel/syscalls/readahead/readahead02.c
+++ b/testcases/kernel/syscalls/readahead/readahead02.c
@@ -213,8 +213,13 @@ static void read_testfile(int do_readahead, const char *fname, size_t fsize,
tst_brkm(TBROK | TERRNO, cleanup, "Failed to open %s", fname);
if (do_readahead) {
- TEST(ltp_syscall(__NR_readahead, fd, (off64_t) 0,
- (size_t) fsize));
+ /* read ahead in chunks, 2MB is maximum since 3.15-rc1 */
+ for (i = 0; i < fsize; i += 2*1024*1024) {
+ TEST(ltp_syscall(__NR_readahead, fd,
+ (off64_t) i, 2*1024*1024));
+ if (TEST_RETURN != 0)
+ break;
+ }
check_ret(0);
*cached = get_cached_size();
--
1.7.1
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [LTP] [PATCH 2/2] readahead02: read in 2M chunks
2014-04-22 8:37 ` [LTP] [PATCH 2/2] readahead02: read in 2M chunks Jan Stancek
@ 2014-05-13 5:18 ` Madan
2014-05-13 6:55 ` Jan Stancek
2014-05-15 11:47 ` chrubis
1 sibling, 1 reply; 7+ messages in thread
From: Madan @ 2014-05-13 5:18 UTC (permalink / raw)
To: ltp-list
On Tuesday 22 April 2014 02:07 PM, Jan Stancek wrote:
> Max readahead size has been limited since commit:
> commit 6d2be915e589b58cb11418cbe1f22ff90732b6ac
> Author: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
> Date: Thu Apr 3 14:48:23 2014 -0700
> mm/readahead.c: fix readahead failure for memoryless NUMA nodes
> and limit readahead pages
>
> Update testcase to read ahead in 2M chunks, this change is
> compatible with older kernels.
>
> Signed-off-by: Jan Stancek <jstancek@redhat.com>
> ---
> testcases/kernel/syscalls/readahead/readahead02.c | 9 +++++++--
> 1 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/readahead/readahead02.c b/testcases/kernel/syscalls/readahead/readahead02.c
> index 8940821..5b1524e 100644
> --- a/testcases/kernel/syscalls/readahead/readahead02.c
> +++ b/testcases/kernel/syscalls/readahead/readahead02.c
> @@ -213,8 +213,13 @@ static void read_testfile(int do_readahead, const char *fname, size_t fsize,
> tst_brkm(TBROK | TERRNO, cleanup, "Failed to open %s", fname);
>
> if (do_readahead) {
> - TEST(ltp_syscall(__NR_readahead, fd, (off64_t) 0,
> - (size_t) fsize));
> + /* read ahead in chunks, 2MB is maximum since 3.15-rc1 */
> + for (i = 0; i < fsize; i += 2*1024*1024) {
> + TEST(ltp_syscall(__NR_readahead, fd,
> + (off64_t) i, 2*1024*1024));
> + if (TEST_RETURN != 0)
> + break;
> + }
> check_ret(0);
> *cached = get_cached_size();
>
IMHO, This patch is not complete, please also change the test pass
criteria what i have sent the patch for.
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [LTP] [PATCH 2/2] readahead02: read in 2M chunks
2014-05-13 5:18 ` Madan
@ 2014-05-13 6:55 ` Jan Stancek
2014-05-13 8:42 ` Madan
0 siblings, 1 reply; 7+ messages in thread
From: Jan Stancek @ 2014-05-13 6:55 UTC (permalink / raw)
To: madanvs; +Cc: ltp-list
----- Original Message -----
> From: "Madan" <madanvs@linux.vnet.ibm.com>
> To: ltp-list@lists.sourceforge.net
> Sent: Tuesday, 13 May, 2014 7:18:48 AM
> Subject: Re: [LTP] [PATCH 2/2] readahead02: read in 2M chunks
>
>
> On Tuesday 22 April 2014 02:07 PM, Jan Stancek wrote:
> > Max readahead size has been limited since commit:
> > commit 6d2be915e589b58cb11418cbe1f22ff90732b6ac
> > Author: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
> > Date: Thu Apr 3 14:48:23 2014 -0700
> > mm/readahead.c: fix readahead failure for memoryless NUMA nodes
> > and limit readahead pages
> >
> > Update testcase to read ahead in 2M chunks, this change is
> > compatible with older kernels.
> >
> > Signed-off-by: Jan Stancek <jstancek@redhat.com>
> > ---
> > testcases/kernel/syscalls/readahead/readahead02.c | 9 +++++++--
> > 1 files changed, 7 insertions(+), 2 deletions(-)
> >
> > diff --git a/testcases/kernel/syscalls/readahead/readahead02.c
> > b/testcases/kernel/syscalls/readahead/readahead02.c
> > index 8940821..5b1524e 100644
> > --- a/testcases/kernel/syscalls/readahead/readahead02.c
> > +++ b/testcases/kernel/syscalls/readahead/readahead02.c
> > @@ -213,8 +213,13 @@ static void read_testfile(int do_readahead, const char
> > *fname, size_t fsize,
> > tst_brkm(TBROK | TERRNO, cleanup, "Failed to open %s", fname);
> >
> > if (do_readahead) {
> > - TEST(ltp_syscall(__NR_readahead, fd, (off64_t) 0,
> > - (size_t) fsize));
> > + /* read ahead in chunks, 2MB is maximum since 3.15-rc1 */
> > + for (i = 0; i < fsize; i += 2*1024*1024) {
> > + TEST(ltp_syscall(__NR_readahead, fd,
> > + (off64_t) i, 2*1024*1024));
> > + if (TEST_RETURN != 0)
> > + break;
> > + }
> > check_ret(0);
> > *cached = get_cached_size();
> >
>
> IMHO, This patch is not complete please also change the test pass
> criteria what i have sent the patch for.
Can you explain why?
If test "reads ahead" (in 2M chunks) the same amount of data,
why should pass criteria change?
Regards,
Jan
>
>
> ------------------------------------------------------------------------------
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform
> available
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
>
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [LTP] [PATCH 2/2] readahead02: read in 2M chunks
2014-05-13 6:55 ` Jan Stancek
@ 2014-05-13 8:42 ` Madan
2014-05-13 9:20 ` Jan Stancek
0 siblings, 1 reply; 7+ messages in thread
From: Madan @ 2014-05-13 8:42 UTC (permalink / raw)
To: Jan Stancek; +Cc: ltp-list
On Tuesday 13 May 2014 12:25 PM, Jan Stancek wrote:
>
> ----- Original Message -----
>> From: "Madan" <madanvs@linux.vnet.ibm.com>
>> To: ltp-list@lists.sourceforge.net
>> Sent: Tuesday, 13 May, 2014 7:18:48 AM
>> Subject: Re: [LTP] [PATCH 2/2] readahead02: read in 2M chunks
>>
>>
>> On Tuesday 22 April 2014 02:07 PM, Jan Stancek wrote:
>>> Max readahead size has been limited since commit:
>>> commit 6d2be915e589b58cb11418cbe1f22ff90732b6ac
>>> Author: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
>>> Date: Thu Apr 3 14:48:23 2014 -0700
>>> mm/readahead.c: fix readahead failure for memoryless NUMA nodes
>>> and limit readahead pages
>>>
>>> Update testcase to read ahead in 2M chunks, this change is
>>> compatible with older kernels.
>>>
>>> Signed-off-by: Jan Stancek <jstancek@redhat.com>
>>> ---
>>> testcases/kernel/syscalls/readahead/readahead02.c | 9 +++++++--
>>> 1 files changed, 7 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/testcases/kernel/syscalls/readahead/readahead02.c
>>> b/testcases/kernel/syscalls/readahead/readahead02.c
>>> index 8940821..5b1524e 100644
>>> --- a/testcases/kernel/syscalls/readahead/readahead02.c
>>> +++ b/testcases/kernel/syscalls/readahead/readahead02.c
>>> @@ -213,8 +213,13 @@ static void read_testfile(int do_readahead, const char
>>> *fname, size_t fsize,
>>> tst_brkm(TBROK | TERRNO, cleanup, "Failed to open %s", fname);
>>>
>>> if (do_readahead) {
>>> - TEST(ltp_syscall(__NR_readahead, fd, (off64_t) 0,
>>> - (size_t) fsize));
>>> + /* read ahead in chunks, 2MB is maximum since 3.15-rc1 */
>>> + for (i = 0; i < fsize; i += 2*1024*1024) {
>>> + TEST(ltp_syscall(__NR_readahead, fd,
>>> + (off64_t) i, 2*1024*1024));
>>> + if (TEST_RETURN != 0)
>>> + break;
>>> + }
>>> check_ret(0);
>>> *cached = get_cached_size();
>>>
>> IMHO, This patch is not complete please also change the test pass
>> criteria what i have sent the patch for.
> Can you explain why?
>
> If test "reads ahead" (in 2M chunks) the same amount of data,
> why should pass criteria change?
>
> Regards,
> Jan
>
>>
>> ------------------------------------------------------------------------------
>> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
>> Instantly run your Selenium tests across 300+ browser/OS combos.
>> Get unparalleled scalability from the best Selenium testing platform
>> available
>> Simple to use. Nothing to install. Get started now for free."
>> http://p.sf.net/sfu/SauceLabs
>> _______________________________________________
>> Ltp-list mailing list
>> Ltp-list@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/ltp-list
>>
In my understanding, readahead can make a cache of upto 2M of cache
pages in memory(i.e 512 and 32 pages in x86 ,PPC64 respectively) ,, But
earlier in this testcase we are looking for the cache value of half the
size of the read file. In my opinion cached_ra can hold max of 2M and
not half the size of the reading file. well correct me if am wrong !!
Regards,
Madan
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [LTP] [PATCH 2/2] readahead02: read in 2M chunks
2014-05-13 8:42 ` Madan
@ 2014-05-13 9:20 ` Jan Stancek
0 siblings, 0 replies; 7+ messages in thread
From: Jan Stancek @ 2014-05-13 9:20 UTC (permalink / raw)
To: madanvs; +Cc: ltp-list
----- Original Message -----
> From: "Madan" <madanvs@linux.vnet.ibm.com>
> To: "Jan Stancek" <jstancek@redhat.com>
> Cc: ltp-list@lists.sourceforge.net
> Sent: Tuesday, 13 May, 2014 10:42:22 AM
> Subject: Re: [LTP] [PATCH 2/2] readahead02: read in 2M chunks
>
>
> On Tuesday 13 May 2014 12:25 PM, Jan Stancek wrote:
> >
> > ----- Original Message -----
> >> From: "Madan" <madanvs@linux.vnet.ibm.com>
> >> To: ltp-list@lists.sourceforge.net
> >> Sent: Tuesday, 13 May, 2014 7:18:48 AM
> >> Subject: Re: [LTP] [PATCH 2/2] readahead02: read in 2M chunks
> >>
> >>
> >> On Tuesday 22 April 2014 02:07 PM, Jan Stancek wrote:
> >>> Max readahead size has been limited since commit:
> >>> commit 6d2be915e589b58cb11418cbe1f22ff90732b6ac
> >>> Author: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
> >>> Date: Thu Apr 3 14:48:23 2014 -0700
> >>> mm/readahead.c: fix readahead failure for memoryless NUMA nodes
> >>> and limit readahead pages
> >>>
> >>> Update testcase to read ahead in 2M chunks, this change is
> >>> compatible with older kernels.
> >>>
> >>> Signed-off-by: Jan Stancek <jstancek@redhat.com>
> >>> ---
> >>> testcases/kernel/syscalls/readahead/readahead02.c | 9 +++++++--
> >>> 1 files changed, 7 insertions(+), 2 deletions(-)
> >>>
> >>> diff --git a/testcases/kernel/syscalls/readahead/readahead02.c
> >>> b/testcases/kernel/syscalls/readahead/readahead02.c
> >>> index 8940821..5b1524e 100644
> >>> --- a/testcases/kernel/syscalls/readahead/readahead02.c
> >>> +++ b/testcases/kernel/syscalls/readahead/readahead02.c
> >>> @@ -213,8 +213,13 @@ static void read_testfile(int do_readahead, const
> >>> char
> >>> *fname, size_t fsize,
> >>> tst_brkm(TBROK | TERRNO, cleanup, "Failed to open %s", fname);
> >>>
> >>> if (do_readahead) {
> >>> - TEST(ltp_syscall(__NR_readahead, fd, (off64_t) 0,
> >>> - (size_t) fsize));
> >>> + /* read ahead in chunks, 2MB is maximum since 3.15-rc1 */
> >>> + for (i = 0; i < fsize; i += 2*1024*1024) {
> >>> + TEST(ltp_syscall(__NR_readahead, fd,
> >>> + (off64_t) i, 2*1024*1024));
> >>> + if (TEST_RETURN != 0)
> >>> + break;
> >>> + }
> >>> check_ret(0);
> >>> *cached = get_cached_size();
> >>>
> >> IMHO, This patch is not complete please also change the test pass
> >> criteria what i have sent the patch for.
> > Can you explain why?
> >
> > If test "reads ahead" (in 2M chunks) the same amount of data,
> > why should pass criteria change?
> >
> > Regards,
> > Jan
> >
> >>
> >> ------------------------------------------------------------------------------
> >> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> >> Instantly run your Selenium tests across 300+ browser/OS combos.
> >> Get unparalleled scalability from the best Selenium testing platform
> >> available
> >> Simple to use. Nothing to install. Get started now for free."
> >> http://p.sf.net/sfu/SauceLabs
> >> _______________________________________________
> >> Ltp-list mailing list
> >> Ltp-list@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/ltp-list
> >>
> In my understanding, readahead can make a cache of upto 2M of cache
> pages in memory(i.e 512 and 32 pages in x86 ,PPC64 respectively) ,, But
Agreed, single readahead() call can contribute up to 2M to cache.
Proposed patch however makes multiple calls.
> earlier in this testcase we are looking for the cache value of half the
> size of the read file. In my opinion cached_ra can hold max of 2M and
> not half the size of the reading file. well correct me if am wrong !!
Consider following, each readahead() call here contributes ~2M to cache.
cached_ra represents difference in cached memory after all these calls complete.
if (do_readahead) {
/* read ahead in chunks, 2MB is maximum since 3.15-rc1 */
for (i = 0; i < fsize; i += 2*1024*1024) {
TEST(ltp_syscall(__NR_readahead, fd,
(off64_t) i, 2*1024*1024));
if (TEST_RETURN != 0)
break;
+ printf("i: %d, cached: %ld\n", i, get_cached_size());
}
check_ret(0);
*cached = get_cached_size();
# ./readahead02
readahead02 0 TINFO : creating test file of size: 67108864
readahead02 0 TINFO : read_testfile(0)
readahead02 0 TINFO : read_testfile(1)
i: 0, cached: 33260
i: 2097152, cached: 35244
i: 4194304, cached: 37352
i: 6291456, cached: 39336
i: 8388608, cached: 41444
i: 10485760, cached: 43428
i: 12582912, cached: 45536
i: 14680064, cached: 47520
i: 16777216, cached: 49628
i: 18874368, cached: 51612
i: 20971520, cached: 53720
i: 23068672, cached: 55704
i: 25165824, cached: 57812
i: 27262976, cached: 59796
i: 29360128, cached: 61904
i: 31457280, cached: 63888
i: 33554432, cached: 65996
i: 35651584, cached: 67980
i: 37748736, cached: 70088
i: 39845888, cached: 72072
i: 41943040, cached: 74180
i: 44040192, cached: 76164
i: 46137344, cached: 78272
i: 48234496, cached: 80256
i: 50331648, cached: 82364
i: 52428800, cached: 84348
i: 54525952, cached: 86456
i: 56623104, cached: 88440
i: 58720256, cached: 90548
i: 60817408, cached: 92532
i: 62914560, cached: 94640
i: 65011712, cached: 96748
readahead02 1 TPASS : expected ret success - returned value = 0
readahead02 2 TPASS : offset is still at 0 as expected
readahead02 0 TINFO : read_testfile(0) took: 1308297 usec
readahead02 0 TINFO : read_testfile(1) took: 687932 usec
readahead02 0 TINFO : read_testfile(0) read: 67108864 bytes
readahead02 0 TINFO : read_testfile(1) read: 0 bytes
readahead02 3 TPASS : readahead saved some I/O
readahead02 0 TINFO : cache can hold at least: 72044 kB
readahead02 0 TINFO : read_testfile(0) used cache: 65552 kB
readahead02 0 TINFO : read_testfile(1) used cache: 65596 kB -----> cached_ra
readahead02 4 TPASS : using cache as expected
Regards,
Jan
>
> Regards,
> Madan
>
>
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [LTP] [PATCH 2/2] readahead02: read in 2M chunks
2014-04-22 8:37 ` [LTP] [PATCH 2/2] readahead02: read in 2M chunks Jan Stancek
2014-05-13 5:18 ` Madan
@ 2014-05-15 11:47 ` chrubis
1 sibling, 0 replies; 7+ messages in thread
From: chrubis @ 2014-05-15 11:47 UTC (permalink / raw)
To: Jan Stancek; +Cc: ltp-list
Hi!
> Max readahead size has been limited since commit:
> commit 6d2be915e589b58cb11418cbe1f22ff90732b6ac
> Author: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
> Date: Thu Apr 3 14:48:23 2014 -0700
> mm/readahead.c: fix readahead failure for memoryless NUMA nodes
> and limit readahead pages
>
> Update testcase to read ahead in 2M chunks, this change is
> compatible with older kernels.
>
> Signed-off-by: Jan Stancek <jstancek@redhat.com>
> ---
> testcases/kernel/syscalls/readahead/readahead02.c | 9 +++++++--
> 1 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/readahead/readahead02.c b/testcases/kernel/syscalls/readahead/readahead02.c
> index 8940821..5b1524e 100644
> --- a/testcases/kernel/syscalls/readahead/readahead02.c
> +++ b/testcases/kernel/syscalls/readahead/readahead02.c
> @@ -213,8 +213,13 @@ static void read_testfile(int do_readahead, const char *fname, size_t fsize,
> tst_brkm(TBROK | TERRNO, cleanup, "Failed to open %s", fname);
>
> if (do_readahead) {
> - TEST(ltp_syscall(__NR_readahead, fd, (off64_t) 0,
> - (size_t) fsize));
> + /* read ahead in chunks, 2MB is maximum since 3.15-rc1 */
> + for (i = 0; i < fsize; i += 2*1024*1024) {
> + TEST(ltp_syscall(__NR_readahead, fd,
> + (off64_t) i, 2*1024*1024));
> + if (TEST_RETURN != 0)
> + break;
> + }
These two patches looks good to me.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-05-15 11:47 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-22 8:37 [LTP] [PATCH 1/2] readahead02: fix signed/unsigned comparison warnings Jan Stancek
2014-04-22 8:37 ` [LTP] [PATCH 2/2] readahead02: read in 2M chunks Jan Stancek
2014-05-13 5:18 ` Madan
2014-05-13 6:55 ` Jan Stancek
2014-05-13 8:42 ` Madan
2014-05-13 9:20 ` Jan Stancek
2014-05-15 11:47 ` chrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox