public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [bug report] readahead02: readahead hardcoded bytes limit
@ 2015-12-11 13:53 Lorenzo Pieralisi
  2015-12-11 15:07 ` Roman Gushchin
  2015-12-21 13:21 ` [LTP] [PATCH] syscalls/readahead02: fix error check Roman Gushchin
  0 siblings, 2 replies; 4+ messages in thread
From: Lorenzo Pieralisi @ 2015-12-11 13:53 UTC (permalink / raw)
  To: ltp

Hi,

following kernel commit:

commit 600e19afc5f8a6 ("mm: use only per-device readahead limit")

LTP readahead02 test produces warnings such as:

readahead02    0  TINFO  :  creating test file of size: 67108864#
readahead02 (1698): drop_caches: 1#
readahead02    0  TINFO  :  read_testfile(0)#
readahead02 (1698): drop_caches: 1#
readahead02    0  TINFO  :  read_testfile(1)#
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: 125319 usec#
readahead02    0  TINFO  :  read_testfile(1) took: 119364 usec#
readahead02    0  TINFO  :  read_testfile(0) read: 67357696 bytes#
readahead02    0  TINFO  :  read_testfile(1) read: 63098880 bytes#
readahead02    3  TPASS  :  readahead saved some I/O#
readahead02    0  TINFO  :  cache can hold at least: 67372 kB#
readahead02    0  TINFO  :  read_testfile(0) used cache: 65420 kB#
readahead02    0  TINFO  :  read_testfile(1) used cache: 4120 kB#
readahead02    0  TWARN  :  readahead02.c:323: using less cache than expected

It is caused by the hardcoded 2MB readahead02 limit used to issue
the readahead syscall, the kernel now caps the number of pages
using the per-device readahead limit, so the readahead count parameter
should be updated accordingly.

There are multiple ways to fix it, simplest is reading the bdi backing
the testfile and use its readahead limit as readahead syscall count
parameter.

Please consider updating the test.

Thanks,
Lorenzo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-01-04  9:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-11 13:53 [LTP] [bug report] readahead02: readahead hardcoded bytes limit Lorenzo Pieralisi
2015-12-11 15:07 ` Roman Gushchin
2015-12-21 13:21 ` [LTP] [PATCH] syscalls/readahead02: fix error check Roman Gushchin
2016-01-04  9:41   ` Jan Stancek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox