Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1214068pxv; Fri, 16 Jul 2021 04:26:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygngujxtitiAWUdOAEXGUVuDHanFyOA5+g08UsbmkCz+g3UbEOPazMD446piz3MJMDg5kv X-Received: by 2002:a5d:928f:: with SMTP id s15mr6974176iom.142.1626434791441; Fri, 16 Jul 2021 04:26:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626434791; cv=none; d=google.com; s=arc-20160816; b=raH7Hd3DtBkEXEw4QC46w8jbCfW4bo2X8Zf6J5q+M9VjkUC5Ema4BjESTFrntHToIx C+r8AAIPknlB3LPhfQwqT4GPq2Otl56NpgQde0kLfr9BnIkeLTIIOKS4nnqA8Y+bjAr8 zFmWZw9Dsesm8p3ID6wushshlzi6Z/P4w++ZhpTEWiRYrxql0tP7dCpLEk20VQ7JLUZB g3VvwhmUGGTeyVkZy971zdcm+ltMJrqFyz/+4u4JGjDhZAfdUVkC8hNEM+3Rvjsxz2Ds puczWjcOpgQa8d8pEbmaXcuRdPNxd/G8n7zeng9DEXT/rGBFShsHxRmwcdR9i2+iaqzr wNzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Dh2PIzlnUvHFBmdkKuZ7ODIlWlfAia5F5qRXgNpzT3I=; b=x0J7Eh3w/Y4Qd1R8I01BHdpp064yloydnUqlSsjy/HeHNmA2hfrKXAgwu3KFxsOVMU mFi/C83mLNNM376zDwoPo66ZkyfCSszvJWtsRvj1/45lXG+x/hEpapxkaBnftjoS7DAh WUcn9dRlRWdUy1q+vC9uy8nnKVPNtU3URyNWeZx8V4rLRrMVnkzMXbAhAQYm4413P+DN eMU9A3y8cd0JR2dtgnZtBhgvODrOALRDpxlkRqx9gfuEiSUnkCTaehdoFWDU7uMCxSqC PJYNzHQ7hR1NZ3jj0DFASzWmA5NAvEK+ekERimQ0jcq+dsWgqoOCqFViOY3dMejT93PQ Oggg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Iy0TfOdO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z13si9222731ile.110.2021.07.16.04.26.16; Fri, 16 Jul 2021 04:26:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Iy0TfOdO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232456AbhGPL1S (ORCPT + 99 others); Fri, 16 Jul 2021 07:27:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232222AbhGPL06 (ORCPT ); Fri, 16 Jul 2021 07:26:58 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCF60C06175F for ; Fri, 16 Jul 2021 04:24:01 -0700 (PDT) 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=Dh2PIzlnUvHFBmdkKuZ7ODIlWlfAia5F5qRXgNpzT3I=; b=Iy0TfOdO+LC3gS+b7BnZ3VVq59 oYlpjMtYhRjqjO5LVF3+dG7T4iIZfKiFuZw2Gv99vhCJFfP4YJZ7w+rSKlHAoo0w05OmPHpr30gcF uukHe1BeMVJUL7sO/4wETWnCxt3nQgoYl31jeIjilW3SHvo5dQEfimqfRAZsMRbMArMzROp9FQCGW XFveN/V2xpk2AWxRH+GdZT8zB14yPVauPNB+3TxN4HRODH8q9yvPLO1X0rIQjG8n9/6R8m6vyWJKY aCI+cOBT0rCEvDSSUVBtoYXoXAbG0l+YAGF8Sg5dmhMXCikuCDRcKp7+5l0kdO2HQHhI69SYq7DDG Np3skuww==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m4Lvk-004QU9-9v; Fri, 16 Jul 2021 11:23:03 +0000 Date: Fri, 16 Jul 2021 12:22:56 +0100 From: Matthew Wilcox To: Yang Huan Cc: Andrew Morton , "Kirill A. Shutemov" , William Kucharski , linux-kernel@vger.kernel.org, linux-mm@kvack.org, kernel@vivo.com, Wang Qing Subject: Re: [PATCH] mm/page_alloc: enable alloc bulk when page owner is on Message-ID: References: <20210716081756.25419-1-link@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210716081756.25419-1-link@vivo.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 16, 2021 at 04:17:53PM +0800, Yang Huan wrote: > Last alloc bulk version have a bug, when page_owner is on, system maybe > crashed due to alloc bulk invoke prep_new_page in irq disabled context, > and set_page_owner use page_flag(may GFP_KERNEL) to get memory and save > stacktrace. > We fix it by a circumvention plan -- bandon alloc bulk feature when > page_owner is set. > I think both alloc_bulk and page_owner is valuable, so, it's worth to > find a way enable alloc bulk when page owner is on. Why do you think it's valuable? The point of alloc_bulk is speed. Doing the allocation of a stack for each page removes the speed. Where's the value? If you're really interested in making both these things work together, then I observed that all of these pages are going to have the same allocation stack. Allocating that stack once per call to alloc_bulk, reference counting it and having each page use the shared stack would be a good way of combining the two (it'd even save memory!) This patch, I think, does not make sense.