Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp893355ybl; Wed, 21 Aug 2019 07:08:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqw91IH+TA+FtUFutjoMl7oWgdVIQCAOLTrYuI4w6chk77+hcpXGKoKZIRf4WzwI3zHbv28h X-Received: by 2002:a63:3dcd:: with SMTP id k196mr29609401pga.45.1566396505623; Wed, 21 Aug 2019 07:08:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566396505; cv=none; d=google.com; s=arc-20160816; b=w2kPAnhONf77qmXbDLWDhGIyY1Pr6YNxnJZKF/rHM6s0Nz24uuR2Wk1I+o/jP8sEZ5 GP+WCzI7WMI98LC41peWPOE7qAZ/luBi8cboID37NT69yyM3c+C8uzirGcBU+cmeJsCF 09NjW33v09zCPTwHU/XGNgddzeHzKVU/1kudI6578uiP5xcATweWMZT5lhtnCYUmmm0G dRYPsc0YDGkCJjbq6GHof22hrzLDnmwR7j39LcJXg+9QxkWrqzdYhjrHAEjm0xLk1H4K EZU/Gmvo2PIuYgBGWWAQHT3Ki59WhnGmuNNmBu9ybCmBb+lv7fd97D9cOQgzxvXtKCSu B5xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=mrlaQ294F4tAlSVGmwb48MfY/9TwU+5NKvRmmMtMo+k=; b=Ys17KlRrwCwacSWf9Ro+68nVhpELvijxAFyQmu0X1C7CVaHHuYkV3qQYtFqVZArBJm C8sVZvv42zvOZdBhrpPBBgcyP9rg5h0Z4WK577QjxTrKiwM+gXCm8A4UDM3Uks8uiNS7 MDASkHC+UefjVKeIS7xBGwBN/Q9FWgZag4bGOrRyiuE2bn+xZPmjFPkpujC0vPR1Io96 f8caF74fIU8Y1NVIrr0+HaWttrtAnUwGBKLkgB7BtQEvdeHcwovQ4x2Tsy283pM6BDcE TSo2Qv8+aargpeBTgzSB5h1DsKYbMzMAjVlCy9sfupY5fXl9cY03xkp33lKccJLpbyET U9aQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x13si14360226pgr.210.2019.08.21.07.08.06; Wed, 21 Aug 2019 07:08:25 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729030AbfHUOGf (ORCPT + 99 others); Wed, 21 Aug 2019 10:06:35 -0400 Received: from mx2.suse.de ([195.135.220.15]:58646 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727949AbfHUOGe (ORCPT ); Wed, 21 Aug 2019 10:06:34 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 7C940AF59; Wed, 21 Aug 2019 14:06:33 +0000 (UTC) Date: Wed, 21 Aug 2019 16:06:32 +0200 From: Michal Hocko To: Khalid Aziz Cc: akpm@linux-foundation.org, vbabka@suse.cz, mgorman@techsingularity.net, dan.j.williams@intel.com, osalvador@suse.de, richard.weiyang@gmail.com, hannes@cmpxchg.org, arunks@codeaurora.org, rppt@linux.vnet.ibm.com, jgg@ziepe.ca, amir73il@gmail.com, alexander.h.duyck@linux.intel.com, linux-mm@kvack.org, linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 0/2] Add predictive memory reclamation and compaction Message-ID: <20190821140632.GI3111@dhcp22.suse.cz> References: <20190813014012.30232-1-khalid.aziz@oracle.com> <20190813140553.GK17933@dhcp22.suse.cz> <3cb0af00-f091-2f3e-d6cc-73a5171e6eda@oracle.com> <20190814085831.GS17933@dhcp22.suse.cz> <20190815170215.GQ9477@dhcp22.suse.cz> <2668ad2e-ee52-8c88-22c0-1952243af5a1@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2668ad2e-ee52-8c88-22c0-1952243af5a1@oracle.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 15-08-19 14:51:04, Khalid Aziz wrote: > Hi Michal, > > The smarts for tuning these knobs can be implemented in userspace and > more knobs added to allow for what is missing today, but we get back to > the same issue as before. That does nothing to make kernel self-tuning > and adds possibly even more knobs to userspace. Something so fundamental > to kernel memory management as making free pages available when they are > needed really should be taken care of in the kernel itself. Moving it to > userspace just means the kernel is hobbled unless one installs and tunes > a userspace package correctly. From my past experience the existing autotunig works mostly ok for a vast variety of workloads. A more clever tuning is possible and people are doing that already. Especially for cases when the machine is heavily overcommited. There are different ways to achieve that. Your new in-kernel auto tuning would have to be tested on a large variety of workloads to be proven and riskless. So I am quite skeptical to be honest. Therefore I would really focus on discussing whether we have sufficient APIs to tune the kernel to do the right thing when needed. That requires to identify gaps in that area. -- Michal Hocko SUSE Labs