From patchwork Mon Feb 5 19:18:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Breno Leitao X-Patchwork-Id: 13546071 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0462EC4828D for ; Mon, 5 Feb 2024 19:19:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7B37D6B0081; Mon, 5 Feb 2024 14:19:01 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 763B36B0082; Mon, 5 Feb 2024 14:19:01 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5B56C6B0083; Mon, 5 Feb 2024 14:19:01 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 4A4E26B0081 for ; Mon, 5 Feb 2024 14:19:01 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 16886803A1 for ; Mon, 5 Feb 2024 19:19:01 +0000 (UTC) X-FDA: 81758712882.06.8D9B6FA Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) by imf21.hostedemail.com (Postfix) with ESMTP id 3AE9A1C0012 for ; Mon, 5 Feb 2024 19:18:58 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=none; spf=pass (imf21.hostedemail.com: domain of breno.debian@gmail.com designates 209.85.208.52 as permitted sender) smtp.mailfrom=breno.debian@gmail.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1707160739; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7YfrI5usOrBhq2NBpdCHSIDWPFSL+4qU1L11CadSm6A=; b=sFfyWu0x9RlJzp40Egu3mqu5p20EF9QhhNsxO4mb9tYSzAxCMcBYUEd24goQMWvuGE71ym aWIF/FXBkld8LmTQ0dJMilIBI+rOHNLX04W00bJtscOzHdKrn1YeoM/aX0XgZ6G4o0OmZr Wcm4ANfXkpLHi1R8oqIei6Echo+Jez8= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1707160739; a=rsa-sha256; cv=none; b=Qj64tSng5ek/iinqdHJ6/g+NPnaiwXdkl0TRhEwKRqQiLDzewaRT1KojKYtINMhSNUGEi6 CqwLzvFGTEKJyltLdK0qA5jtG+qsPFzjT6Nwiqtnb3Rty836jLx7Z+ViomzgL6TVBSRqNK wfYUGRt169YL1w3TahBCDEoTZJflIGk= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=none; spf=pass (imf21.hostedemail.com: domain of breno.debian@gmail.com designates 209.85.208.52 as permitted sender) smtp.mailfrom=breno.debian@gmail.com; dmarc=none Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-56025fcaebaso2473785a12.0 for ; Mon, 05 Feb 2024 11:18:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707160738; x=1707765538; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7YfrI5usOrBhq2NBpdCHSIDWPFSL+4qU1L11CadSm6A=; b=cclekSsef/G2Jg07qdPyG2nqvo+J0LlhLw2/K5CDVj8vexuP2TVJSWSEiJtWQaXXHY stZsJo6qISN76VUPL9bAINizwOcxX/C/dSewqi6ST63IG9UmtUrjj8TBRmTWZQcmJCeY FiQfwTdsZegCGuNY3HO/kFfbDqfbezkVNX6Ngejoicn8+m/C3hOw00Te3wOF+aPQ2hlz tqZ1c4i3ZwoTDFmyX8wgz4Gg8I9mo96pZQ+/GxNJ715UcA+bWPImqMF3KRKyom12L6Ws Rp8gV5iTvMoaM4RRxRK80H5IHQNJG6ipg/7eIAeHH2yAUS6egKOvwf/99vjjLrYV8Wvf FmWw== X-Gm-Message-State: AOJu0YyuCtqP9ekzoG7nroz8CL8KYlq/cxt1014nIKzTWYbAoLzu0f9R U8jMkddo0M4YnmT76BNCH5JS3fvpUv7MG5zRp/Ml16fuXXel4TIf X-Google-Smtp-Source: AGHT+IFgHGSXN1+B6BcH3MtCqD1qFGb9lFA9lq3vDOdsEG6QnqMggULNf8ZrBeQOV4xk1iJaLYSJZw== X-Received: by 2002:a17:907:7746:b0:a28:d1f9:976 with SMTP id kx6-20020a170907774600b00a28d1f90976mr228274ejc.65.1707160737874; Mon, 05 Feb 2024 11:18:57 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXVm5RKPt+Hlz22NnQj7TZfmCmCPsU/XvEaNZ9YvFqmT9hiTOEBxbGNZw9X7DUtafu4eEfhaq4K6nUvuLarSkrwmFkypvNZGY7hG96yJ7PZzbhjJLZtnmzXOjqjEQrp5aPiBokhkMhhB+dDl40ykJWzz4TeDugPTAoqJy4oRsQdUAiyiMpxskMZnvCEJLgVgWHWUpMb0kUD6GNkKfx97LTrv7PzZIWgemoQZ9XX3oX1jL7wXkGnMuJesFH0OUtC1S74UkOpFrdBMgKDHDmUuuWS4PsAOYHq/7o9vAVwvNpkrvZI9hK79X4KJPuwIP9BKcVJr2B9i0CxaPS8 Received: from localhost (fwdproxy-cln-021.fbsv.net. [2a03:2880:31ff:15::face:b00c]) by smtp.gmail.com with ESMTPSA id x15-20020a170906134f00b00a372b38380csm167637ejb.13.2024.02.05.11.18.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 11:18:57 -0800 (PST) From: Breno Leitao To: mike.kravetz@oracle.com, linux-mm@kvack.org, akpm@linux-foundation.org, muchun.song@linux.dev Cc: lstoakes@gmail.com, willy@infradead.org, hannes@cmpxchg.org, mhocko@kernel.org, roman.gushchin@linux.dev, linux-kernel@vger.kernel.org, Rik van Riel Subject: [PATCH v2 1/2] mm/hugetlb: Restore the reservation if needed Date: Mon, 5 Feb 2024 11:18:41 -0800 Message-Id: <20240205191843.4009640-2-leitao@debian.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240205191843.4009640-1-leitao@debian.org> References: <20240205191843.4009640-1-leitao@debian.org> MIME-Version: 1.0 X-Stat-Signature: d1yu5xsges5d54o1qq7oa4m3nff3hkyh X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 3AE9A1C0012 X-Rspam-User: X-HE-Tag: 1707160738-10602 X-HE-Meta: U2FsdGVkX1/rKc9jgMt3+K8UovrqoIWl84AaTwqrP5i+9Wkjo8ikP5/SJzJ+8YorL1MT8hFPIxCItsd660IyrMCa+TeMBlEpjGcokWU35FrZvUC7BeldGgxp/i37tS+wWK2Wqf2rrJ2MvF/ugXPUwJgEuzi6D7X+eEfz4qUgEfzcpNL2oUFkXQFZV4/QayeOMC2Q650SW7ZCTHZySEp8Inu+IiBpVdh4lw4mAqsdqXfmkkQTbTB/8Y5YbkXuxqBy859e7C/0EFHAHr8Km6E4woDfDGF4xNoq0ikZd85wLxduF5ApsG5B4isoUPscNY/1QW3Ab5A4rVvTGeORDrS1HEc81JGC6tZPWGl67TRBD3iRTf6OlULoBwbMTqg9G+cm8fCc8bVLYU8ReG/UbrU1sRwZT/dZA+cRsmkRCXNxRHB+M2WelGiWr00Eexs9nBN6HHQDU22/qnYBACOVOxTIqMnJsnxUtefKbq6junzdu2ze0qqLXXN7uAA1aEiUwqEmpJxd5hNojZa3HYiJRd6XuD45odG182nkhJo693iWH7KbG8GEJOo7TGBvabCy6kG9E/3AW1X+6RJd9KFtQTMo8BRpwsabgcGEKzmGCWFTvN3B2ELiuFMg9ZbXZY0eAtSF9nT9hYaKRImqhHFpqp31YlWZhh4FyXAhiWQ5Io6pBGpYmODus5fzOK7m6oykp9z9hWqmAT5ALM+NuHtAARJgF5VvGlnoHuYEe2GUmesh1B8nE6hpTkKcUIGpdN1ZFZZ/WIMfYKyYEOF7U015+kBpNWL83TW9ub+Mgld9wIrHuXzSF79IEgc+KZaZO4fLz60z9DioCEzv7b6+fnlfREOdsnV8wgeDZrkSJQWHQ6jenW3CDzkO4OZk2G8mmR+NPBq/p6/vXCV+8wdbhq3ZelHmicb90WHswNoZKJ628Pr6nHtf0NZVsFquL8/9HUkIG46RwBUgROVVo/QOjQACXit Bp7zgWuP JINE+mVe8gZ7uXvnVXZ57Tmx2SvF/m1A16MCWPGrv+1rhqcHOR2OMy2E5d6mKDiCfm1lUrIwQu3mY89uM8d0h0QqjK6IHlYHcSiN5yCSuzGeWICFnTt+PhcNE9CfTaaT78al7zhZGIfkDE1MhIAutrGzyopQGaSajTkeDoUV+xlwwLNYUpNGFXHpwqEem3+sw+o7jTtUC0NK8TBpc79Pqo+3AWTavNV2146ICbzurWUHJL17M121WM1aZvT340UD0UV+S5wOQqUvGaqbCr0IJE3LgtQaZ0ocsrJqnwtMOsA1VokEL6VntIMZNisB1hOmN6BF8en4tiBzZGL955unA8MqapPst2rDimWf542NucztOZHYtdpPlBXAgmociaj5WvgZ9toJodblMXS3oiHDGRTmfJtiVj6A9th3g/kZM1v96qmpu1f3dUGEy50R7cI0u36n6aPW+RsryUd62vsRRBkDKnNAp2toaBL3PYuzT/RRFE690HXAbWKRBgeS46OSVwkIvAj5aXtKAftBK4kCiHfGDCg86deDhW888ZeexKcJTEo7WthgTcXsj0MKHZ8F4F02j X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Currently there is a bug that a huge page could be stolen, and when the original owner tries to fault in it, it causes a page fault. You can achieve that by: 1) Creating a single page echo 1 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages 2) mmap() the page above with MAP_HUGETLB into (void *ptr1). * This will mark the page as reserved 3) touch the page, which causes a page fault and allocates the page * This will move the page out of the free list. * It will also unreserved the page, since there is no more free page 4) madvise(MADV_DONTNEED) the page * This will free the page, but not mark it as reserved. 5) Allocate a secondary page with mmap(MAP_HUGETLB) into (void *ptr2). * it should fail, but, since there is no more available page. * But, since the page above is not reserved, this mmap() succeed. 6) Faulting at ptr1 will cause a SIGBUS * it will try to allocate a huge page, but there is none available A full reproducer is in selftest. See https://lore.kernel.org/all/20240105155419.1939484-1-leitao@debian.org/ Fix this by restoring the reserved page if necessary. These are the condition for the page restore: * The system is not using surplus pages. The goal is to reduce the surplus usage for this case. * If the VMA has the HPAGE_RESV_OWNER flag set, and is PRIVATE. This is safely checked using __vma_private_lock() * The page is anonymous Once this is scenario is found, set the `hugetlb_restore_reserve` bit in the folio. Then check if the resv reservations need to be adjusted later, done later, after the spinlock, since the vma_xxxx_reservation() might touch the file system lock. Suggested-by: Rik van Riel Signed-off-by: Breno Leitao --- mm/hugetlb.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index ed1581b670d4..44f1e6366d04 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -5585,6 +5585,7 @@ void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma, struct page *page; struct hstate *h = hstate_vma(vma); unsigned long sz = huge_page_size(h); + bool adjust_reservation = false; unsigned long last_addr_mask; bool force_flush = false; @@ -5677,7 +5678,31 @@ void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma, hugetlb_count_sub(pages_per_huge_page(h), mm); hugetlb_remove_rmap(page_folio(page)); + /* + * Restore the reservation for anonymous page, otherwise the + * backing page could be stolen by someone. + * If there we are freeing a surplus, do not set the restore + * reservation bit. + */ + if (!h->surplus_huge_pages && __vma_private_lock(vma) && + folio_test_anon(page_folio(page))) { + folio_set_hugetlb_restore_reserve(page_folio(page)); + /* Reservation to be adjusted after the spin lock */ + adjust_reservation = true; + } + spin_unlock(ptl); + + /* + * Adjust the reservation for the region that will have the + * reserve restored. Keep in mind that vma_needs_reservation() changes + * resv->adds_in_progress if it succeeds. If this is not done, + * do_exit() will not see it, and will keep the reservation + * forever. + */ + if (adjust_reservation && vma_needs_reservation(h, vma, address)) + vma_add_reservation(h, vma, address); + tlb_remove_page_size(tlb, page, huge_page_size(h)); /* * Bail out after unmapping reference page if supplied From patchwork Mon Feb 5 19:18:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Breno Leitao X-Patchwork-Id: 13546072 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 331D7C48292 for ; Mon, 5 Feb 2024 19:19:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4D0086B0082; Mon, 5 Feb 2024 14:19:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 408746B0083; Mon, 5 Feb 2024 14:19:03 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2829B6B0085; Mon, 5 Feb 2024 14:19:03 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 1B3786B0082 for ; Mon, 5 Feb 2024 14:19:03 -0500 (EST) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id E41BA40A7A for ; Mon, 5 Feb 2024 19:19:02 +0000 (UTC) X-FDA: 81758712924.14.E38E9C8 Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) by imf28.hostedemail.com (Postfix) with ESMTP id 09162C0009 for ; Mon, 5 Feb 2024 19:19:00 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf28.hostedemail.com: domain of breno.debian@gmail.com designates 209.85.218.43 as permitted sender) smtp.mailfrom=breno.debian@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1707160741; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/WC26n55iZnXbww+34MstvyMYAWzNyFy0JnU0QygjqI=; b=ZUvihlw99xLc/4kftXEXWLsUCkuROyPPWMkx/g1RTBFeW1SC1v6HKj5jxekVovXRB0KHNY YBucpzb+fbnSZ7q4BnCZcjSVoFavNbCnkF4LirhwFfUn5iPG5KXjkbkE15eaBY8ovbvbvA GcxqbBfeO923ruApU/N5Lu+RxDAKESE= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf28.hostedemail.com: domain of breno.debian@gmail.com designates 209.85.218.43 as permitted sender) smtp.mailfrom=breno.debian@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1707160741; a=rsa-sha256; cv=none; b=mS6/BUCyW/ABq2vrQBMjFK7j2YqENnnyGrW5yD36XcFhyj3EA5Emjdv1v+t3jIWrT2qZq3 EwKETJbUTegeI0ne9RLpo3oLoGa6ytDAUeNsfbBMDq5hgFQr361HiuLu/36szT47E736PK vY6eo3auAvqwcZk9UUxHvdWFIpzZoDk= Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a26fa294e56so7805666b.0 for ; Mon, 05 Feb 2024 11:19:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707160740; x=1707765540; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/WC26n55iZnXbww+34MstvyMYAWzNyFy0JnU0QygjqI=; b=l9I6ePOEu6ihjhH6jX3XICtHbrqwo9ZDx3utRPRaDD7WsjWcBVmC/ZwjY0bHLVZCl+ Eljee9t4H7Aq8eI7mGzB5jz9aLizx4wYZe2VX5+jQLrjndmKzGYCQWq7TU79wUTJZfTC aUOGKvrJMB+waQ1HMxmRhHZB55OXSZ8ZSCLhhWDSiOvOISZ8tkozjv/z5mtzietEatDI +VoQbFuHYzwM0y2hSh67sQw4i3zs3zE0pzvBjpdoMta5fwJKCfVoAKyS+orTiTvcwy61 Tj6fWtp2C5wIpTMiiKfXmR1FBpFFp+NfSzmUjWLMcgZaGdVvUXTLcqMcseKAj+NUjhem Cvww== X-Gm-Message-State: AOJu0YzorTY5LxHBFI+eYBftEp8uRwyO6e/bHqVi+2Pn3QoW1wCG5b33 52aV9Xg+0Hr2wsGg0Nalr36T8SPU06FzPbY0Nf+1jEA3CoZuPFrN X-Google-Smtp-Source: AGHT+IHLc0HadsV/eDekFcvJhQSwC9u5/Jfj7dNNksLZBMHsGXWIlh9ubGXg+AAPmWeKyat/93baTg== X-Received: by 2002:a17:906:2456:b0:a37:aa39:ea27 with SMTP id a22-20020a170906245600b00a37aa39ea27mr270002ejb.65.1707160739532; Mon, 05 Feb 2024 11:18:59 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUnz2Sd1sNKTlh9XUDSn65VAeg6JyD3s7WLIQ/AfZVc3isM/4jwLTT3rCz6D3aOibuSJbNxTV7xdKsyzl43Jl7nwofsacO+7LrqvYEhR0j/SSA/edgIrR9eynGCSYOZldjwSA11NMQiyCmWZJuBLEuTr66gcE+P7xNWzxcKrQo9yuRIANDY3QaLwr6mtiyuFu1CgPqSvlN7mM8gzwRyEM0TBls1KHITRga7eCqYyEOnsQpel/UgZ9zD7Vm/EY9bO2yHahpVWGtWfPGZ7rkiCEFzMNHm4ia7CWCiGPu/tf3zl9LI1n4odRGBVzdW/dpNiHxhM+J/RkIllH8jstVP5BbLt5Kyk5Ti/IZolE2vlpIaPmq7U0tonZ3nm1Ch Received: from localhost (fwdproxy-cln-018.fbsv.net. [2a03:2880:31ff:12::face:b00c]) by smtp.gmail.com with ESMTPSA id qb12-20020a1709077e8c00b00a373993b390sm156733ejc.148.2024.02.05.11.18.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 11:18:59 -0800 (PST) From: Breno Leitao To: mike.kravetz@oracle.com, linux-mm@kvack.org, akpm@linux-foundation.org, muchun.song@linux.dev, Shuah Khan Cc: lstoakes@gmail.com, willy@infradead.org, hannes@cmpxchg.org, mhocko@kernel.org, roman.gushchin@linux.dev, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org (open list:KERNEL SELFTEST FRAMEWORK) Subject: [PATCH v2 2/2] selftests/mm: run_vmtests.sh: add hugetlb_madv_vs_map Date: Mon, 5 Feb 2024 11:18:42 -0800 Message-Id: <20240205191843.4009640-3-leitao@debian.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240205191843.4009640-1-leitao@debian.org> References: <20240205191843.4009640-1-leitao@debian.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 09162C0009 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: s936p3jq61fxma931bfxerc4znffj3g9 X-HE-Tag: 1707160740-544103 X-HE-Meta: U2FsdGVkX1+wuJWwf9NoLVdSP0qYCiF1dPUFKXJsJSMGjGr3ylrrHe6ypiwuoBVJSY+88VKyYbN73pF1aH1m65Zq90NmLtD5qRHt/wdlV3wuoObrXhBsJufzT2MQjj/nDSjlY9oEG162HeD4J1oI5q3Zw8x9pi0hndTb+WeEWqi38WnCS4rEYLto/RsAXdkwRn3D1E2jJIf0402CZ/DOLr1hVhRPNB/vs2kODxc4vHIF9xLwkkl4+pJ7ro4nZX8LtP1A1xCcTT4sTZcTvznMt7GF1OALWQtWInhmGsFCXEUQ9K2+oEoq3iu1zl1Ki9UkGoV7X29S/SBGkqjp4vxqb1MW/xwI5cocPb1MqGAFiBwwHmwGnNY3ohKNs9LX7QK0/Hv+lLL1SITkUQ3iRbCIydHuW5R3sNF2BI9bynj7rAX+PYXFuye3uTKgQoG4Q5EtiFrIC8vkgQq+xI8hBblr5XvaJiamUzagQAV3UP/ZXFe3aunvigByGQYhKLMOF2r39rj4NCFdzKkJNEqQ0pZYGis4yAN98Mz23AqCmVH0ngYqGBBqvSvfH16b29sKCcL3j/gS2tkpBvS72qrdNFP7WH+vhGjZkNwH7D3tDTMMw0pKFZxo8mNlWFK/4h5u/mf6N84PDxwQZYRRZR9iPeE3djHfFJHYz+uJ7UGagftsnQBm0mCg5DFUFCdfePaydlwkx/YpkBaA/nzwZob9jrvBCz2EPCd/7xXXL0RWusn/p/xnEUWPHEMWQ/oyMrYCIedPVWDkf0+UusKZU//XfhegGzCvfD/iUcu8sTgodGreUOJkSmO975VZyFy+qw3KQPuAgg0mTfdD6WMPfgydqQscUgkvDTHpeXDwVV9dU1Qrrir9KvfpqwYD6jFsvJw91XESYjWK6HvFPnloFRcbGMMhm8dDjK/zDxoFsswNTkNut0rneBW6P2yyrMO4x9dMvRl1BjRkmg/7PxRfNdv9wE7 bs5HYTKV Al6MlJNvpZcc9Q6WvYKCg3qvce2XtEiCJ+wwFtKLb5qa9lXRItpA3yxltb0xNoVuxMtfNexGzYmNBRJBSQn5EV/loIgjV+1MtoSJMREt2H7iRqfNwREFQ3ulSeiHuaNjDu1vn2/Ndz+XnVjifSW7AIAJZaI6gL2LROGSEh8O+SLuyt2mpNBFZGtsTmwLqixvF67BghHvFQq0AYROotUHuQHeeCTQyrW5dGeBk/rnCWqYo37ST9K/Hw79aF8EFmd6lADemIQewQaXXIy6/iJ1NUzdUiTE3O6FH81Pq9LOKudPBycLdlhp1AwH0tcdSrLk8IUZsppRnHo1SbT+VJyl9ifDeqO7IzP0rWq02rrXlbdbFIdCqq9Jpio9zapu5fTFaO1b1PEbyw665V87+iv5IreuCP0/D9XHV/H5S2I3LwtYI6RmMH7jg8duGDgWYja4BfKYTVspTT1Q9AJbx4Dvl2jKaKASGfl4H9ePL76aM4+d3R3kodvm7ZlQEww== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: hugetlb_madv_vs_map selftest was not part of the mm test-suite since we didn't have a fix for the problem it found. Now that the problem is already fixed (see previous commit), let's enable this selftest in the default test-suite. Signed-off-by: Breno Leitao --- tools/testing/selftests/mm/run_vmtests.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh index 246d53a5d7f2..50e2094ed761 100755 --- a/tools/testing/selftests/mm/run_vmtests.sh +++ b/tools/testing/selftests/mm/run_vmtests.sh @@ -253,6 +253,7 @@ nr_hugepages_tmp=$(cat /proc/sys/vm/nr_hugepages) # For this test, we need one and just one huge page echo 1 > /proc/sys/vm/nr_hugepages CATEGORY="hugetlb" run_test ./hugetlb_fault_after_madv +CATEGORY="hugetlb" run_test ./hugetlb_madv_vs_map # Restore the previous number of huge pages, since further tests rely on it echo "$nr_hugepages_tmp" > /proc/sys/vm/nr_hugepages