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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF8DBC4332F for ; Mon, 13 Nov 2023 18:30:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231520AbjKMSa5 (ORCPT ); Mon, 13 Nov 2023 13:30:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229989AbjKMSaz (ORCPT ); Mon, 13 Nov 2023 13:30:55 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBD0A10EC for ; Mon, 13 Nov 2023 10:30:50 -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=MHY5DgRsGlef0gPl4g05l9qLDqCoWUNy1TAlPD0LkNg=; b=jIXR0VxMBYaxT4FZjUlh/ah+Mc 8YG9RNZ0biVkigNeUCTjla2ktm4jdMGXLBDygyIiNq/bvROgLOse1rYvU6MUbOD5X8XP5fSmv7w69 +vVDY4mGqC1LBYoP7EL0SStRmGkbX9QQTlT2fBNwuVRIULs6OBBx5wREUtXHfoyiZBahXVNE7qpF5 M6u7oBAYD2wCwizYnyM9wV3dVgZrM9Nuruihyutyl5q2ItLNHBuvfRVNauOldRoU4UtBv/F3YZFSS Y8zyikH8upeDkcKuCwvRvEwc9sKYewpFUxxyUg0aeOSHRQkQEkAqjW2UxS2JximD+DKtH01KUrPJW sZMLgDkw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1r2bhk-00Fmtf-Tu; Mon, 13 Nov 2023 18:30:37 +0000 Date: Mon, 13 Nov 2023 18:30:36 +0000 From: Matthew Wilcox To: Zi Yan Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Huang, Ying" , Ryan Roberts , Andrew Morton , David Hildenbrand , "Yin, Fengwei" , Yu Zhao , Vlastimil Babka , "Kirill A . Shutemov" , Johannes Weiner , Baolin Wang , Kemeng Shi , Mel Gorman , Rohan Puri , Mcgrof Chamberlain , Adam Manzanares , "Vishal Moola (Oracle)" Subject: Re: [PATCH v1 1/4] mm/compaction: enable compacting >0 order folios. Message-ID: References: <20231113170157.280181-1-zi.yan@sent.com> <20231113170157.280181-2-zi.yan@sent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231113170157.280181-2-zi.yan@sent.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 13, 2023 at 12:01:54PM -0500, Zi Yan wrote: > + /* this makes migrate_pages() split the source page and retry */ > + if (folio_order(src) > 0) > + return NULL; Nit: folio_test_large() is more efficient than folio_order() > 0. The former simply tests the bit, while the second tests the bit, then loads folio->_order to check it's >0. We know it will be, but there's no way to tell gcc that if the bit is set, this value is definitely not 0.