Received: by 10.223.185.116 with SMTP id b49csp2103801wrg; Mon, 12 Feb 2018 04:29:43 -0800 (PST) X-Google-Smtp-Source: AH8x227tZc1kLozOkcpnOff9VfIseKJe9Sb5kS0M2GsGNvnetB3SYYAEQVdmcn1RfyZQrhM+s+xL X-Received: by 2002:a17:902:ab85:: with SMTP id f5-v6mr10793721plr.199.1518438583084; Mon, 12 Feb 2018 04:29:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518438583; cv=none; d=google.com; s=arc-20160816; b=R/qw/4tXIlKssUl9jKfJYWFbcxLdI8bIUHOs5tfryRUIIriuxG8mHPIH3GVPxk0CzQ 92noY9DV6ASqOyNTtNtixImgTV4yQmQlKAQM6y28rnB/kV27ywOORNvIr3DUoAPY7BQP giQ52FAUYjq6gVchkA+90D7Dfye6HUeBRq1gAHnuSqwKZFrO8q59konCqTFb+yeNpPEo 509p1yOrVmVvK4kn0kut3eHobA8+dzUlOggAotePRV8pdD31f6299m6tlFY66S+Gn5LW qn0WSXRFotG2DR4kA1de+/O1Q4vwR/OLqrX+hgFXWlLv9th9USOU2DydwEgQ75o6uunT 3Naw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:arc-authentication-results; bh=Z4csZ3kxHPCLONsBQRLn/e1YxL2p6qjw9Ay7UeX/SvA=; b=l3rW6H7elOofqphsVlhmTK/w6+wHN/V2yKxEz+t3S1qbF4UIbUVnht1LCUJC8EWswT NQDgD17aOYQPU/RsPk8TENvHqYB1CoNxM4OmXpNTEgWeq+BBd4ID+maHxEpFiTs3nV8a X5/Xuczryfol4YxY9RNhiOuvzAE+wu4+y4JW7FWvNzO93YpB6tvogAUvdtHJYkAKSI/8 PrlPlUPFlAC9AXzP4NWdL82Tl+HzmBoufbsUZGSQDkjgfUKCTQtULctrLtXEGL+lEBUM JyP6vl5fEBZiLV5BgKrgkFkQhTAuwGRUVW/Ce/sA/zE9ByA3PIattShd/6bxiBdPmpAH BhcQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 70-v6si30748plc.827.2018.02.12.04.29.29; Mon, 12 Feb 2018 04:29:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933436AbeBLJ6x (ORCPT + 99 others); Mon, 12 Feb 2018 04:58:53 -0500 Received: from mga17.intel.com ([192.55.52.151]:16629 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932505AbeBLJ6v (ORCPT ); Mon, 12 Feb 2018 04:58:51 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Feb 2018 01:58:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,501,1511856000"; d="scan'208";a="17451709" Received: from yusongso-mobl1.ccr.corp.intel.com (HELO [10.255.28.205]) ([10.255.28.205]) by orsmga008.jf.intel.com with ESMTP; 12 Feb 2018 01:58:49 -0800 Subject: Re: [kselftests] compaction_test is blocked From: Li Zhijian To: Li Zhijian , Dan Rue Cc: linux-kselftest@vger.kernel.org, "Li, Philip" , linux-kernel@vger.kernel.org References: <700acd92-2b0b-d2da-615e-1f228708d216@cn.fujitsu.com> <20180209211119.xbch2eok6holyvel@xps> <7c95e7cc-1955-ba99-9aa5-4bf5d994bd58@cn.fujitsu.com> <30e882ea-1e79-44bf-9a85-c0be105ec218@intel.com> Message-ID: <5cdc12c4-a85f-f1bd-8008-52296f90da3a@intel.com> Date: Mon, 12 Feb 2018 17:58:36 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <30e882ea-1e79-44bf-9a85-c0be105ec218@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018年02月12日 11:26, Li Zhijian wrote: > > > 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: >>>> Hi >>>> >>>> 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 >>> Hi Zhijian, >>> >>> 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. Hi Dan, I ran this case on this commit 4c1baad22390, this issue still occurs. root@ivb44 ~# dmesg | tail -n 30 [  105.825870] main: 247 [  105.825994] main: 242 [  105.826130] main: 247 [  105.826250] main: 242 [  105.826394] main: 247 [  105.826506] main: 242 [  105.826617] main: 247 [  105.826728] main: 242 [  105.826840] main: 247 [  105.826950] main: 250 [  105.827272] check_compaction: 98 [  105.827589] check_compaction: 105 [  105.827849] check_compaction: 111 [  105.828152] check_compaction: 118 [  105.828451] check_compaction: 123 the runtime code is like ------------------- 110 111         fprintf(stderr, "%s: %d\n", __func__, __LINE__); 112         /* Start with the initial condition of 0 huge pages*/ 113         if (write(fd, "0", sizeof(char)) != sizeof(char)) { 114                 perror("Failed to write 0 to /proc/sys/vm/nr_hugepages\n"); 115                 goto close_fd; 116 } 117 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__); 124         if (write(fd, "100000", (6*sizeof(char))) != (6*sizeof(char))) { 125                 perror("Failed to write 100000 to /proc/sys/vm/nr_hugepages\n"); 126                 goto close_fd; 127         } ------------------- Thanks > > 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@vger.kernel.org >>>> More majordomo info at http://vger.kernel.org/majordomo-info.html >>> >>> . >>> >> >