Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp164545ybt; Mon, 6 Jul 2020 06:36:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynLsRO2LOiIH9tgnOBfj3X4L4RaSNK8XS//VbUvuUkcqLk3ozUHYf/7qpW7vvKNlvRM2lJ X-Received: by 2002:a17:906:dce:: with SMTP id p14mr42163655eji.442.1594042560555; Mon, 06 Jul 2020 06:36:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594042560; cv=none; d=google.com; s=arc-20160816; b=rboXW4ff0rDepKMcFFPgiP68oVPN+q3aDAe0etBLZMqDllgSQW3YAJlI11J3SUdEZP l3EbNfRvqEPj1CwQgNtb1+gHbp33ODvLi9VNunP0lAStwglBYdRKot4ZQj4YGwy/OHVM pelFxMcOWU/yjs5PdwTlkih9UYPnSU+6+NR61CJbJHo5SxtL49oZarfy430K1mkLqdwr m/4Zj3Jx3G+VABKJO1amOn9404dHUiQPxxClLE9MM7Mz8iSXU5GVEjPUxwXlXcRkX5pR dcXvJ26nKHnjFboGS1cMKuOw5h7mnM4U34nbVrhaJq/BEI/aqZr6UVceC+Z5TP/JZE+S +XMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=FqnsbqsDiCUax1/bWG+rQQu/DMntiJdQgZpyKCW8IU4=; b=S2n0OkLkBYKfC60YUb4X+aWzUfTav0Hgsvhl/waWOsGHfCXgB6cYW9eVIUOvwk0oFg voc5CWAxcx8+O3ZR5Q2+wQzCv/wMoscvcM//PmqEt7SyHJb43ueUCnwBY1H5xc5CvsaU txVUHz5P7P6eVdl4KM0FGmDpR4KwGh7U9TTJGyhlQPFDSl3VLNoHF7iSjZs4akJLnVrJ ZOoX1a9GMIK1iFy+FduG+IWYskFZRNXjZQzIxp66FvXA7eowFEGOZotR2wW0/hHu4zEP eC1TrQh1uT5SzfENosxu9D0/gazPnYMCt6g4kmyHRr0jzKxvSAtTSmL0Lrj/iG0x823Y W1sw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u17si13543758ejj.13.2020.07.06.06.35.37; Mon, 06 Jul 2020 06:36:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729442AbgGFNeo (ORCPT + 99 others); Mon, 6 Jul 2020 09:34:44 -0400 Received: from mga11.intel.com ([192.55.52.93]:22677 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729390AbgGFNef (ORCPT ); Mon, 6 Jul 2020 09:34:35 -0400 IronPort-SDR: CNjeike65LN1YpQGTOgmj7GR0lcJuF+1gkluJuSHD4K4WoUjgsBnIWj3TYKPh9fi+5G80Mkbat VUHtxHFVjNdg== X-IronPort-AV: E=McAfee;i="6000,8403,9673"; a="145520052" X-IronPort-AV: E=Sophos;i="5.75,320,1589266800"; d="scan'208";a="145520052" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2020 06:34:35 -0700 IronPort-SDR: uza9DKlu1Z8lPzS8c68lYnD2oxSCVKGcigfaAZ2U+t+swpOmjFFQIY5mca5nC3svAa256Qkl3u CSNECqWL3ImQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,320,1589266800"; d="scan'208";a="483134004" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.21]) by fmsmga005.fm.intel.com with ESMTP; 06 Jul 2020 06:34:34 -0700 Received: by tassilo.localdomain (Postfix, from userid 1000) id 76DF1301BE3; Mon, 6 Jul 2020 06:34:34 -0700 (PDT) Date: Mon, 6 Jul 2020 06:34:34 -0700 From: Andi Kleen To: Feng Tang Cc: Qian Cai , Andrew Morton , Dennis Zhou , Tejun Heo , Christoph Lameter , kernel test robot , Michal Hocko , Johannes Weiner , Matthew Wilcox , Mel Gorman , Kees Cook , Luis Chamberlain , Iurii Zaikin , tim.c.chen@intel.com, dave.hansen@intel.com, ying.huang@intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, lkp@lists.01.org Subject: Re: [mm] 4e2c82a409: ltp.overcommit_memory01.fail Message-ID: <20200706133434.GA3483883@tassilo.jf.intel.com> References: <20200705044454.GA90533@shbuild999.sh.intel.com> <20200705125854.GA66252@shbuild999.sh.intel.com> <20200705155232.GA608@lca.pw> <20200706014313.GB66252@shbuild999.sh.intel.com> <20200706023614.GA1231@lca.pw> <20200706132443.GA34488@shbuild999.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200706132443.GA34488@shbuild999.sh.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos); > - if (ret == 0 && write) > + if (ret == 0 && write) { > + if (sysctl_overcommit_memory == OVERCOMMIT_NEVER) > + schedule_on_each_cpu(sync_overcommit_as); The schedule_on_each_cpu is not atomic, so the problem could still happen in that window. I think it may be ok if it eventually resolves, but certainly needs a comment explaining it. Can you do some stress testing toggling the policy all the time on different CPUs and running the test on other CPUs and see if the test fails? The other alternative would be to define some intermediate state for the sysctl variable and only switch to never once the schedule_on_each_cpu returned. But that's more complexity. -Andi