History log of /external/ltp/testcases/kernel/syscalls/readahead/readahead02.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d8cd45ca8cb268a3fcf4d0679d5fdd24f499ece6 03-Oct-2017 Cyril Hrubis <chrubis@suse.cz> Make use of SAFE_OPEN()

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/syscalls/readahead/readahead02.c
7bf0cbd87d8981d0a1d034ca4e6a24219e5a77c1 03-Oct-2017 Cyril Hrubis <chrubis@suse.cz> Make use of SAFE_MUNMAP()

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/syscalls/readahead/readahead02.c
df007542635aed8686b5ebc111b0807a67349b41 03-Oct-2017 Cyril Hrubis <chrubis@suse.cz> Make use of SAFE_CLOSE()

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/syscalls/readahead/readahead02.c
817d8095fbfe5ebe22b29f58b7483f3d8d5e3fcc 24-Jul-2017 Richard Palethorpe <rpalethorpe@suse.com> Rename linux_syscall_numbers.h to lapi/syscalls.h

Move testcases/kernel/include/linux_syscall_numbers.h to lapi/syscalls.h so
that it is easily accessible from the LTP library as well as the tests.

Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
Acked-by: Jan Stancek <jstancek@redhat.com>
/external/ltp/testcases/kernel/syscalls/readahead/readahead02.c
d62f6f8486394a6d35ca5cc1f8069c1e26485188 26-May-2017 Cyril Hrubis <chrubis@suse.cz> readahead02: Fix warnings.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/syscalls/readahead/readahead02.c
eac3375d4b90c9784c20e893ab732def44ed0c31 15-May-2017 Jan Stancek <jstancek@redhat.com> readahead02: include errno in failure message

Signed-off-by: Jan Stancek <jstancek@redhat.com>
/external/ltp/testcases/kernel/syscalls/readahead/readahead02.c
fb5ce4796adb606cc32b673b5187aba36fd7cbe8 10-Oct-2016 Jan Stancek <jstancek@redhat.com> readahead02: estimate max readahead size

Max readahead size is kernel implementation detail, which can and
already has changed in past (and probably will again [1]).
Futher, current (4.8) implementation defines it as block device's
read_ahead_kb, which means its value varies based on storage/fs
setup.

This patch estimates max readahead size based on cache increase
from first readahead call and then advances offset for subsequent
calls by that amount. It also makes sure it's > 0 to guarantee,
that it eventually reaches end of file.

This also fixes test on Btrfs, where it wasn't working previously
since there is no /sys/dev/block/$major:$minor/ for the anonymous
block devices that are used internaly for subvolumes.

[1] https://lkml.org/lkml/2016/7/25/308

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Tested-by: Cyril Hrubis <chrubis@suse.cz>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/syscalls/readahead/readahead02.c
29a24639f7b5c69cd9a397201e364a5e863d57cc 14-Sep-2016 Jan Stancek <jstancek@redhat.com> readahead02: fix path for read_ahead_kb on raw partitions

Path to read_ahead_kb is not consistent for all block devices,
for example for LVM it's:
/sys/dev/block/$maj:$min/queue/read_ahead_kb
but for raw partitions "queue" is only in "parent" device:
/sys/dev/block/$maj:$min/../queue/read_ahead_kb

This patch checks both types and reads first one it can find.
Tested on LVM and raw partitions with 4.7.3.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/syscalls/readahead/readahead02.c
38396b3e4c72a04679f6a209861f032f711f5cc5 24-Mar-2016 Jan Stancek <jstancek@redhat.com> readahead: use glibc wrapper function

We have had reports of this testcase not functioning
properly on 32bit powerpc systems, because syscall()
is not passing 64bit parameters correctly.

This patch is using glibc wrapper, which should be available
for a long time now (since glibc 2.3).

Reported-and-tested-by: Julio Cruz Barroso <julio.cruz@smartmatic.com>
Reported-and-tested-by: Kshitij Malik <Kshitij.Malik@mitel.com>
Signed-off-by: Jan Stancek <jstancek@redhat.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/syscalls/readahead/readahead02.c
f6b7a503db7dd5c9c957e64a90604791f8f6c19c 15-Mar-2016 Roman Gushchin <klamm@yandex-team.ru> syscalls/readahead02: use bdi max readahead limit

After commit 600e19afc5f8a6 ("mm: use only per-device readahead limit")
readahead size is not limited anymore by 2 megabytes. Instead,
the per-bdi limit is used for kernels 4.4 and older.

Signed-off-by: Roman Gushchin <klamm@yandex-team.ru>
Signed-off-by: Jan Stancek <jstancek@redhat.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/syscalls/readahead/readahead02.c
ae4e530df2df456749a0afdce8b22c27249a0af0 15-Mar-2016 Jan Stancek <jstancek@redhat.com> readahead02: don't underflow cached/cached_ra

Julio Cruz reported a failure, where readahead failed to utilize
any cache, moreover cache usage went down, which resulted in
cached_ra underflow.

Reported-by: Julio Cruz <jcsistemas2001@gmail.com>
Signed-off-by: Jan Stancek <jstancek@redhat.com>
/external/ltp/testcases/kernel/syscalls/readahead/readahead02.c
d1e794d62b1bf619df8390535e4c2a58899b1145 30-Jul-2015 Cyril Hrubis <chrubis@suse.cz> lib: Get rid of unused tst_require_root() callback

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/syscalls/readahead/readahead02.c
d6d11d08678aac1ed2c370ea8e42e5f45aea07be 09-Mar-2015 Cyril Hrubis <chrubis@suse.cz> Introduce tst_parse_opts()

The pattern that was used in all testcases is:

const char *msg;

msg = parse_opts(...);
if (msg)
tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);

This change simplifies the steps to just calling:

tst_parse_opts(...);

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/syscalls/readahead/readahead02.c
aabb8340f63ed31afe995fd97795e542dc68b93c 04-Feb-2015 Cyril Hrubis <chrubis@suse.cz> Include usctest.h in test.h

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/syscalls/readahead/readahead02.c
605fa3362fd7cef0baa2131be32cf44661783d3e 04-Feb-2015 Cyril Hrubis <chrubis@suse.cz> Get rid of TEST_CLEANUP

Special thanks to Coccinelle for making this easy job.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/syscalls/readahead/readahead02.c
0b9589f3f9c0345b29cfcf7da5a1253c708303eb 27-May-2014 Cyril Hrubis <chrubis@suse.cz> testcases: Constify char *msg variable.

The parse_opts() now returns const char * instead of char * this commit
fixes all warnings caused by the change.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/syscalls/readahead/readahead02.c
09bea28b888f0fd22edda956243a1dac00617af8 22-Apr-2014 Jan Stancek <jstancek@redhat.com> readahead02: read in 2M chunks

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>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/syscalls/readahead/readahead02.c
02ee88cf252e530f2fabd1bb2b72945232771176 22-Apr-2014 Jan Stancek <jstancek@redhat.com> readahead02: fix signed/unsigned comparison warnings

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/syscalls/readahead/readahead02.c
d59a659cd639ca2780b00049d102acd2a783d585 07-Mar-2013 Caspar Zhang <caspar@casparzhang.com> s/Tst_count/tst_count/ to avoid CamelCase

when using latest checkpatch.pl, CamelCase variables are not encouraged,
this patch does a batch update to replace all var `Tst_count` with
`tst_count`.

Signed-off-by: Caspar Zhang <caspar@casparzhang.com>
Acked-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
/external/ltp/testcases/kernel/syscalls/readahead/readahead02.c
359980f68b19c77c698b121b57a071dfe6e3ca31 15-Feb-2013 Jan Stancek <jstancek@redhat.com> rename syscall() macro to ltp_syscall()

This patch renames syscall() macro defined in linux_syscall_numbers.h
to reduce confusion with syscall(2). It also updates all places
where it was previously in use.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
/external/ltp/testcases/kernel/syscalls/readahead/readahead02.c
354ebb48db8e66a853a58379a4808d5dcd1ceac3 07-Dec-2012 Wanlong Gao <gaowanlong@cn.fujitsu.com> cleanup code indent

Cleanup the code indent using:

find . -name *.c -exec Lindent {} \;

It's really a big change, but can fix almost all of
the indent problem in C code, although we can't
ensure all of the changes are right, but the error
changes are really few.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
/external/ltp/testcases/kernel/syscalls/readahead/readahead02.c
dd4927f8f9a05148343fefe4b08561783621ac98 15-Oct-2012 Jan Stancek <jstancek@redhat.com> new syscall test: readahead02

Use readahead() syscall and check if subsequent
read saves some I/O and if cache size increased.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
/external/ltp/testcases/kernel/syscalls/readahead/readahead02.c