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=-5.8 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 192CFC6369E for ; Thu, 19 Nov 2020 09:37:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5BAD52222A for ; Thu, 19 Nov 2020 09:37:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="OHU/Nk7y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5BAD52222A Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5D4606B005C; Thu, 19 Nov 2020 04:37:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 584D56B005D; Thu, 19 Nov 2020 04:37:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 473F36B0068; Thu, 19 Nov 2020 04:37:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0199.hostedemail.com [216.40.44.199]) by kanga.kvack.org (Postfix) with ESMTP id 1B9656B005C for ; Thu, 19 Nov 2020 04:37:08 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id BA724181AEF21 for ; Thu, 19 Nov 2020 09:37:07 +0000 (UTC) X-FDA: 77500664094.10.desk61_311283d27341 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id 8BE6D16A4BC for ; Thu, 19 Nov 2020 09:37:07 +0000 (UTC) X-HE-Tag: desk61_311283d27341 X-Filterd-Recvd-Size: 3230 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf49.hostedemail.com (Postfix) with ESMTP for ; Thu, 19 Nov 2020 09:37:06 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1605778625; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rvZpREnf2ZBqTsPqNdHkc6HulpfCj66OhqW0/gv6vro=; b=OHU/Nk7y4PKSF6tWK9/YtZd2KlJEkBtLlkagrl7IwAy6Fm4XXriExwpCgfaKeTIHGhSBpg F7NYujm25ZUKtUmRC4oDsf4okuLBLsKRbCodSySmEEhSvveCc8f6yQcOzKpPJitl2+fZs3 nhm/G8eWul/7U/pWd81FmgxYohN2r9I= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 7FF00AA4F; Thu, 19 Nov 2020 09:37:05 +0000 (UTC) Date: Thu, 19 Nov 2020 10:37:03 +0100 From: Michal Hocko To: Rik van Riel Cc: hughd@google.com, xuyu@linux.alibaba.com, akpm@linux-foundation.org, mgorman@suse.de, aarcange@redhat.com, willy@infradead.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, linux-mm@kvack.org, vbabka@suse.cz Subject: Re: [PATCH 1/2] mm,thp,shmem: limit shmem THP alloc gfp_mask Message-ID: <20201119093703.GB12284@dhcp22.suse.cz> References: <20201105191508.1961686-1-riel@surriel.com> <20201105191508.1961686-2-riel@surriel.com> <20201112105258.GZ12240@dhcp22.suse.cz> <84effe90c3ee13fbfa6e732d2e3b3d9b557d1be1.camel@surriel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <84effe90c3ee13fbfa6e732d2e3b3d9b557d1be1.camel@surriel.com> 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: On Fri 13-11-20 22:44:20, Rik van Riel wrote: > On Thu, 2020-11-12 at 11:52 +0100, Michal Hocko wrote: > > On Thu 05-11-20 14:15:07, Rik van Riel wrote: > > > > > > This patch applies the same configurated limitation of THPs to > > > shmem > > > hugepage allocations, to prevent that from happening. > > > > I believe you should also exaplain why we want to control defrag by > > the > > global knob while the enable logic is per mount. > > I added that to the changelog for the next version of > the patches. > > > > This way a THP defrag setting of "never" or "defer+madvise" will > > > result > > > in quick allocation failures without direct reclaim when no 2MB > > > free > > > pages are available. > > > > > > With this patch applied, THP allocations for tmpfs will be a little > > > more aggressive than today for files mmapped with MADV_HUGEPAGE, > > > and a little less aggressive for files that are not mmapped or > > > mapped without that flag. > > > > This begs some numbers. A little is rather bad unit of performance. I > > do > > agree that unifying those makes sense in general though. > > The aggressiveness is in changes to the gfp_mask, eg by > adding __GFP_NORETRY. How that translates into THP > allocation success rates is entirely dependent on the > workload and on what else is in memory at the time. Yes and that is why I would argue about consistency with THP rather than put claims that hard to back by numbers. -- Michal Hocko SUSE Labs