Received: by 10.223.164.221 with SMTP id h29csp746593wrb; Sat, 4 Nov 2017 02:56:29 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TkwNX6qHFXgO9DpH5mPEZYxvyVwps+6+YfOEoh77KVz/J2PCynLOrVHIXTbixFsCgYLZCM X-Received: by 10.98.245.152 with SMTP id b24mr10584863pfm.56.1509789389857; Sat, 04 Nov 2017 02:56:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509789389; cv=none; d=google.com; s=arc-20160816; b=hQ+ZZstjxSQUqM/aiJBj8gTyp7cmybLh4H3PmS76uRO2d9a3EZNzIKs/l9vI/0eVtN oJAJSxVvKaLES6xOsDLjPm2jyCAVTukYwzpLJMFxqJNLQGAuHxNl6eP5vPqWduQfGZ9x qu53SkkeUEJazojJmxx8F1FXZRpI/kG6IrxaxBEXam8DHfWWIqTIwy19wSNRd08CWHLg T51patkh5SXoPAVo4XLUsRBt+Q7EokQKE/a2wyMr5zM4wOlYBrnnIxHIDLDSgCos0I9l 7uTY1pc2V56CVpnW5Bj6y5DK+fP4l0ZAwXuXUzDT56UClK4KN/Fy3sG1O9SKVMPzrR5w FH5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :mime-version:dkim-signature:arc-authentication-results; bh=T5xcZBpzKMAdKkG4xo26oxsTkhb5LBkY5XSbMHGJ38w=; b=uIIdJhTBtFYcxHIPThqIdzqPcEBeO9OchUjDuLrlnxBs4iz2u7Ycm8GLNqGWGIE1eY RFJhrhQXJtkBdFDpHZ+wFtIpJ+x2wjVvj+vTds8jTYToPkq3xVBUgwlPVvRaTbJsQMGD ielWM/dcQRjbpIoLkRVVXgIwx9v317j7DlwDSU5lUjD4z6QyUfOEmkSgb/FHbVgQcC3n Z/WXjvjX0cyuUOYn0MubxaHfhwLHT7X8xmJP3fJeM/DV9dQHtq2A9YgXB8jPToPVMy1O w08Bv+TqXOnwS4K+r5XEGtgplSKeb/wbAt+TMmN+nfEtX9UJDUMHddHI2jWXj1wJSiOj o84w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=g/MJHNlf; 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=NONE 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 j30si8392098pga.620.2017.11.04.02.56.17; Sat, 04 Nov 2017 02:56:29 -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=g/MJHNlf; 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=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756607AbdKDJzi (ORCPT + 94 others); Sat, 4 Nov 2017 05:55:38 -0400 Received: from mail-ua0-f195.google.com ([209.85.217.195]:43449 "EHLO mail-ua0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756518AbdKDJzf (ORCPT ); Sat, 4 Nov 2017 05:55:35 -0400 Received: by mail-ua0-f195.google.com with SMTP id u32so3509965uau.0 for ; Sat, 04 Nov 2017 02:55:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=T5xcZBpzKMAdKkG4xo26oxsTkhb5LBkY5XSbMHGJ38w=; b=g/MJHNlf675yxFUoFlLACPDJYRV5OEwD7DbQ67SptVfciJpdKfiMlMk0hntMg5bLtR AAFbrGXmyxv8VA0IXtfcKD87Xq0yRbBDPvsB1MPPJnQRk9MZf9VHuuSjH3TzQp7JhvzN yS7Wt4IuzWqojVK1M1oD1wOVFPZTQMoE+CKFq4fOb6FNs4oDMzS2j7B59L8lsYZNRBl4 k6JlzV/XPNJpx1/RJnn1hvjUPaDiD+/iolLj3XqrGcVWJKQzl7YtAaUkYUJhgwDG0jQM bPpqMd+fxCxN+DEgA/kgcKKKlveWVO/cej8w6w3y46i8FxvnblvOuWSGPGCH0qrLnuAf HMVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=T5xcZBpzKMAdKkG4xo26oxsTkhb5LBkY5XSbMHGJ38w=; b=ZofMxbPF8ucnlKleO6zxUXQS0Ipg9IiJ5aGAkMO8YMorpNGJKVoPUvtZTIQhhPTKMe E2/g1vt3Fa6AB+rWALm43GeRfFS7uIttYHB96n2fZoc57jY/TIc43FWZjN8LtpVPDL4I Xluji4nnG09Dxys4x3F7Nyz/kj5gHJ2LS59m7OHZC3FEqgJqOJw4HHLsL8+djqKl+fgj W/njipnG0yTUZ+wqi2i2NFcUPuYYBhF7hvpWQNf4Av2jryDHGhVEVL7bpkbm4z7pCrjs oyQOhUuXXgOzuNlsnZRvsp0cVy+KycNQFezvrJevd6xppXi7BekKZZHujPdhsRChu+Yx yvPA== X-Gm-Message-State: AMCzsaWZxcGbGI3bKUn7amRhgOzokO6JxIzb0473t5GOCAkjdp4m0dSk 2bHBt/3VjcpDdQeGxVzv1c+E7Lw7tmDz0DVaenWjmg== X-Received: by 10.176.3.46 with SMTP id 43mr8236162uat.55.1509789334764; Sat, 04 Nov 2017 02:55:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.115.66 with HTTP; Sat, 4 Nov 2017 02:55:14 -0700 (PDT) From: Maxim Levitsky Date: Sat, 4 Nov 2017 11:55:14 +0200 Message-ID: Subject: Guaranteed allocation of huge pages (1G) using movablecore=N doesn't seem to work at all To: LKML Cc: linux-mm@kvack.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! My system has 64G of ram and I want to create 32 1G huge pages to use in KVM virtualization, on demand, only when VM is running. So I booted the kernel with 'hugepagesz=1G hugepages=0 default_hugepagesz=1G movablecore=40G' However I still can't allocate the pages reliably. For instance this simple script is enough to make it not possible to even allocate one 1G huge page after few dozens of iterations: while true ; do sudo hugeadm --enable-zone-movable --pool-pages-min 1G:0G sudo hugeadm --enable-zone-movable --pool-pages-min 1G:60G done I disabled mlock systemwide (now ulimit -l shows 0), I still see 8 pages mlocked in zone 'Movable' but this is not enough to explain this nr_mlock 8 I do have around 64GB of swap too, but I see no even an attempt to use it. # free total used free shared buff/cache available Mem: 65887928 1748344 62640276 61688 1499308 62053832 Swap: 67108860 0 67108860 Any idea about what is going on? This was tested on 4.14.0-rc5 (my custom compiled) and on several older kernels (4.10,4.12,4.13) from ubuntu repositories. Disabling/enabling transparent huge pages in the kernel config didn't make a difference. VT-d was enabled during the tests (intel_iommu=on,igfx_off) if that would make any difference, but no VM was started when I run the above script, in fact I run it just after the system booted. Best regards, Maxim Levitsky From 1583358629196455983@xxx Mon Nov 06 22:47:38 +0000 2017 X-GM-THRID: 1581728527965537224 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread