Hi Dan,
On 2018å02æ11æ 13:44, Li Zhijian wrote:
On 02/10/2018 05:11 AM, Dan Rue wrote:
On Fri, Feb 09, 2018 at 03:53:59PM +0800, Li Zhijian wrote:
HiHi Zhijian,
kselftests is integrated Intel 0Day project.
Sometimes we found compaction_test is blocked for more than 1 hours until i kill it.
Try to figure out where it is running, i added some log to this case.
the test log is like:
-------------------
 [ 111.750543] main: 248
 [ 111.750544]-
 [ 111.750821] check_compaction: 98
 [ 111.750822]-
 [ 111.751102] check_compaction: 105
 [ 111.751103]-
 [ 111.751362] check_compaction: 111
 [ 111.751363]-
 [ 111.751621] check_compaction: 118
 [ 111.751622]-
 [ 111.751879] check_compaction: 123
 [ 111.751880]-
-------------------
118ÂÂÂÂÂÂÂÂ fprintf(stderr, "%s: %d\n", __func__, __LINE__);
119ÂÂÂÂÂÂÂÂ lseek(fd, 0, SEEK_SET);
120
121ÂÂÂÂÂÂÂÂ /* Request a large number of huge pages. The Kernel will allocate
122ÂÂÂÂÂÂÂÂÂÂÂ as much as it can */
123ÂÂÂÂÂÂÂÂ fprintf(stderr, "%s: %d\n", __func__, __LINE__);ÂÂÂÂÂÂÂÂ <<<======== the last line we can catch.
124ÂÂÂÂÂÂÂÂ if (write(fd, "100000", (6*sizeof(char))) != (6*sizeof(char))) {ÂÂÂÂÂÂÂ <<<<============ blocking position
125ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ perror("Failed to write 100000 to /proc/sys/vm/nr_hugepages\n");
126ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ goto close_fd;
127ÂÂÂÂÂÂÂÂ }
128
129ÂÂÂÂÂÂÂÂ lseek(fd, 0, SEEK_SET);
130
131ÂÂÂÂÂÂÂÂ fprintf(stderr, "%s: %d\n", __func__, __LINE__);
132ÂÂÂÂÂÂÂÂ if (read(fd, nr_hugepages, sizeof(nr_hugepages)) <= 0) {
133ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ perror("Failed to re-read from /proc/sys/vm/nr_hugepages\n");
134ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ goto close_fd;
135ÂÂÂÂÂÂÂÂ }
-------------------
According to above log and code, it most likely it is blocking at the writing operation.
my environment is like:
OS: debian
kernel: v4.15
model: Ivytown Ivy Bridge-EP
nr_cpu: 48
memory: 64G
Please try this patch in mainline:
ÂÂÂÂ 4c1baad22390 kselftest: fix OOM in memory compaction test
Hi Dan
Thanks for your replies.
I run this case on v4.15, looks this patch is already merged to v4.15.
lizhijian@inn:~/linux$ git describe 4c1baad
v4.15-rc2-2-g4c1baad223906
My mistake, this path is not contained by v4.15 yet.
i will have a try.
Thanks
Thanks
Dan
NOTE: 0Day can reproduce this issue in 20% on 0Day.
Anybody can help have a look?
Thanks
Zhjian
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
.