From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 364D8C388F7 for ; Tue, 10 Nov 2020 18:16:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CD44D20809 for ; Tue, 10 Nov 2020 18:16:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="ipGMqHHT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731557AbgKJSQx (ORCPT ); Tue, 10 Nov 2020 13:16:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731516AbgKJSQr (ORCPT ); Tue, 10 Nov 2020 13:16:47 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52D29C0613CF for ; Tue, 10 Nov 2020 10:16:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=pKCQZvoOQvWJRr3uzI2/rpjCuOUN8d8NnWJ8MSJwkRQ=; b=ipGMqHHT+Uh0XxKxUPFmvFKydJ dMurDpcXKK5sQ2/Kql2V4k2Osotc5yw2+jhhptLKc8IM6uVGToetKBKz5EgkjKfrtYk4Ga1yyGz5k H6B4TO7qAC4KL/3BDzhj9GYRytENrSmJ8eb6ThZP82QFvASFzUgGkpLADZsH9g/rhw8UThhWuUblc 6HdOuGwSctoZheyJbn0UDl6le+M/JTi/OLZ27iLf+KTEL2EZXAlY19AEbq9tlOmDMatiE0MNx9Sqg h4OgllRyJrqxS4wkayL/q+JaAkQrmv5R+1q81aARrPjo9YD6XAbxgi5N0UEVMjqtscS9xLc5A1ZcY wuXuDAAg==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcYC4-0001JN-3d; Tue, 10 Nov 2020 18:16:36 +0000 Date: Tue, 10 Nov 2020 18:16:36 +0000 From: Matthew Wilcox To: Yang Shi Cc: mhocko@suse.com, ziy@nvidia.com, songliubraving@fb.com, mgorman@suse.de, jack@suse.cz, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [v2 PATCH 3/5] mm: migrate: skip shared exec THP for NUMA balancing Message-ID: <20201110181636.GJ17076@casper.infradead.org> References: <20201110181250.264394-1-shy828301@gmail.com> <20201110181250.264394-4-shy828301@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201110181250.264394-4-shy828301@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 10, 2020 at 10:12:48AM -0800, Yang Shi wrote: > @@ -2142,6 +2151,10 @@ int migrate_misplaced_transhuge_page(struct mm_struct *mm, > int page_lru = page_is_file_lru(page); > unsigned long start = address & HPAGE_PMD_MASK; > > + if (IS_ENABLED(CONFIG_READ_ONLY_THP_FOR_FS) && > + is_shared_exec_page(vma, page)) > + goto out; Why include the IS_ENABLED() check? Once the ~50 patches I have pending go in, shared executable THPs can exist without this option. And can't we have executables on tmpfs today without this option too?