Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp725839imm; Fri, 15 Jun 2018 05:24:22 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLCCmEw9eQEJC5NXBEkTO/qU/Xhj1NIS3x40rZGVejRXh6/wLcKdWH1Y9ZjGbYaGpBe3fES X-Received: by 2002:a17:902:778e:: with SMTP id o14-v6mr1806113pll.214.1529065462038; Fri, 15 Jun 2018 05:24:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529065462; cv=none; d=google.com; s=arc-20160816; b=v4zCfuEPrVCH8qVpgBGwMYwjBh3AxDCCYK4JtMhUWCx5ylGam1uyoAt51n8LuwTiwx TnK+K+4DwaRYoM2zTAQ9Kl/UFt8Z7hFr2OZkasAdf9WsSc9a1SpeMVlZ+O/LlYM0zOQp /KxDeD7sXmQJVkFAXLN3fXz37edOW8tpRWquoqjeYZk4NUxO48cziAy7saiv24HdDKYp F7XZ3ONZwOAHbrmlPq7m9O4iLJ1g+BA3FVZmlPfg6aVYpArE58DmvaMml4UZ7djn3rNz CFo38tneE6hW7rTRKY7FTioisHI9+w1cUS5UDYhYYE3TYPDWPk/bNI9d4LwTN9bwUzsU TBOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=UXxx1FczAPdUqatoh53nERhVr5wb6NSsUiCtqgbJ2ao=; b=l2OQQ39xfURFHbLkY2iKtX1qXmRUqbzfx5HxNPa7Z4q3GiVL3TByN0OJBE53+aVCdo AJ2zC5z3MH5rQvCKMLpCV4/Ys77RPCgTcb3uY6uy+QIt3gu0tIA4pKAjDbZMr8UdOEFs jVue1Uy+s+A+fFzeptB+5QdjmB1Di5JXZ6s75B7nWORyEkip8l04ML0UPuBN7qIHayKP OBtKpTsObcBH/j21QKx0+5/oz+iLfX0J3QLYdOQaCK6wnP/EbwwfYsCZOs/Tn90oYu+s AcTvZc2t29nIXt2MAUn65D+E+SpCIxvVw25Z+Al/CQ6U7CsU72R1G/mVnas1T0m93r0H ryfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Z5TAJjgX; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g67-v6si8405316plb.73.2018.06.15.05.24.07; Fri, 15 Jun 2018 05:24:22 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Z5TAJjgX; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755936AbeFOMXn (ORCPT + 99 others); Fri, 15 Jun 2018 08:23:43 -0400 Received: from mail-io0-f194.google.com ([209.85.223.194]:38486 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755749AbeFOMXm (ORCPT ); Fri, 15 Jun 2018 08:23:42 -0400 Received: by mail-io0-f194.google.com with SMTP id l19-v6so10544091ioj.5 for ; Fri, 15 Jun 2018 05:23:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=UXxx1FczAPdUqatoh53nERhVr5wb6NSsUiCtqgbJ2ao=; b=Z5TAJjgXUGZuS4tksn1YI0S31u4BdihJjOXTdnI6jZSkhvm+wCyCiuJ4iXzuZu/Vsh lxc+VP8/iAnLt98frt00egXzs2vAl1iZ24vOH2iLokpCLgtJEgbNsbafpCbTaFWGzp6n CnvZh6+mu8JIkO1yxVtvPcxH6gmzrlyO3S6orB4RqKi9byl3AWZB3NRKEUWcu9bpAjkS Qj4tMEL7UNRIlRhw5BTQVqA457X7pXED6WIESpTD7bTVpiRzbeLHqJGALuhmxpWclOzn DMBcARJZH/ng3fFhB3oAqmhAQP6ZSYnUL45PLX6/mfVmac6JBGV9m0pQIfMKwyHBjgiB wG3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=UXxx1FczAPdUqatoh53nERhVr5wb6NSsUiCtqgbJ2ao=; b=PSig6XGEANogO18EZNy1vBOlcSiXGK3A9tu7ogGRQm9ogyqukQRt5Q5XCls8t2DU4k W7iuxZ7wVj7xzHrVwikrIBFUDo4uR1u7qeQ+pML5hu2vxfR2abxSifHirA4rOmJOyAU/ SvTHT7hGKDgx2oNMQPyT/bPEMa1SzG8ulEF6Pv3GwtQ/17sSMm8/kc3BJyRWhzk8/mAQ SIBTmLWRxhdNLjmpOS1akw0O8n2E8/hEvHhxDT6AyWNBzr694Yjhb+eZjrC6wPvJBoGi +HYoErBz0g8gyc0fhXYdLMPjDKUF7qMJPEabZVhfAR1Im3t6o7bf2U2vIWOcyIdgSpCp nyHg== X-Gm-Message-State: APt69E1w/AHR1irApOzEhJalmzD0i/2pVwNWGVZklaQEfJB0pOX2GaiE P5Dt3817BbDjNsPqDTVl+Md378AG X-Received: by 2002:a6b:bf01:: with SMTP id p1-v6mr1266167iof.67.1529065420876; Fri, 15 Jun 2018 05:23:40 -0700 (PDT) Received: from [191.9.206.254] (rrcs-70-62-41-24.central.biz.rr.com. [70.62.41.24]) by smtp.gmail.com with ESMTPSA id y13-v6sm2736686iob.53.2018.06.15.05.23.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jun 2018 05:23:39 -0700 (PDT) Subject: Re: [PATCH 1/2] x86: x86_64_defconfig: Enable KSM. To: =?UTF-8?Q?Daniel_D=c3=adaz?= , x86@kernel.org Cc: anders.roxell@linaro.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Josh Poimboeuf , Krzysztof Kozlowski , "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" References: <1529016629-2948-1-git-send-email-daniel.diaz@linaro.org> From: "Austin S. Hemmelgarn" Message-ID: Date: Fri, 15 Jun 2018 08:23:39 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <1529016629-2948-1-git-send-email-daniel.diaz@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-06-14 18:50, Daniel Díaz wrote: > As per the documentation, Kernel Samepage Merging (available > since 2.6.32) is a memory-saving de-duplication feature, > enabled by CONFIG_KSM=y and activated via sysfs. More > information can be found here: > https://www.kernel.org/doc/Documentation/vm/ksm.txt > > When enabled in the kernel, the default is to not do anything > at all, until it is activated at run-time with: > echo 1 > /sys/kernel/mm/ksm/run > As pointed out by a couple of others, this doesn't explain why this is a good idea. All you're doing here is giving a reason that it won't have a negative impact on most users. Two points that may be worth adding, but also don't really argue for it being a significant improvement: * Pretty much all of the major distributions that use pre-built kernels have it enabled in their kernels (At minimum, Debian, Ubuntu, Fedora (and by extension RHEL and CentOS), openSUSE (and by extension SLES), Arch, and Alpine have it enabled), so enabling this in defconfig would bring it a bit closer to parity with distribution kernels in terms of core features. * Software other than QEMU is starting to take advantage of it if available (for example, Netdata [1] can mark it's in-memory TSDB's for deduplication, which usually cuts it's memory usage roughly in half). [1] https://my-netdata.io/