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=-0.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 24DC0C433E0 for ; Thu, 2 Jul 2020 17:15:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DE12821582 for ; Thu, 2 Jul 2020 17:15:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="jRTnLo/s" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DE12821582 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 679EB8D0012; Thu, 2 Jul 2020 13:15:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 602C68D000C; Thu, 2 Jul 2020 13:15:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4A3CB8D0012; Thu, 2 Jul 2020 13:15:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0055.hostedemail.com [216.40.44.55]) by kanga.kvack.org (Postfix) with ESMTP id 304428D000C for ; Thu, 2 Jul 2020 13:15:07 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id D975C8248047 for ; Thu, 2 Jul 2020 17:15:06 +0000 (UTC) X-FDA: 76993786212.29.class11_5e1558d26e8b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id A8F7118086CA0 for ; Thu, 2 Jul 2020 17:15:06 +0000 (UTC) X-HE-Tag: class11_5e1558d26e8b X-Filterd-Recvd-Size: 2083 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf47.hostedemail.com (Postfix) with ESMTP for ; Thu, 2 Jul 2020 17:15:04 +0000 (UTC) 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=AkKtnmHmvL46FS6TSZsGc+QvVSp7DuMXzazIW+80hK0=; b=jRTnLo/s8fZyHcTuIdV5XmRbtl TYp8I7siWaanCxhbwrfxQQxjcvi6X+rMQ5zcOm9unFn+6gvGrKysJVMMsyLN6O/gvLY9CElt64Tot avdiY9Wsj898soNOG7Em/UmdjAwgik0oDQuaJyRBXzecN+SmtZjhMjL2MdoZMjsHIGGeixnHwTUAF YcN1+AJdCsiC+agBv/xd9YC1XjBBYeVzlQxG3P3iWeh3jLH0+oR2TbH5fDdhOAhW12Sn9eNVb1oP0 Vl+v4gHed2WvoAHhbAhS798yrZmH804iJLmZVfdgbFCr9xwdcD26Y/ikl1UeZ3aXMXVgU9jSjDVXX ExHeqA2w==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jr2nU-0003Ji-5U; Thu, 02 Jul 2020 17:14:52 +0000 Date: Thu, 2 Jul 2020 18:14:52 +0100 From: Matthew Wilcox To: Long Li Cc: cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4] mm, slab: Check GFP_SLAB_BUG_MASK before alloc_pages in kmalloc_order Message-ID: <20200702171452.GZ25523@casper.infradead.org> References: <20200702152759.GA32931@lilong> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200702152759.GA32931@lilong> X-Rspamd-Queue-Id: A8F7118086CA0 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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 Thu, Jul 02, 2020 at 03:27:59PM +0000, Long Li wrote: > --- > changes in V4: > -Change the check function name to kmalloc_check_flags() > -Put the flags check into the kmalloc_check_flags() The point of not doing that was that this is unlikely(). With your change there is now a function call to check something that's (extremely) unlikely(). I take David's point that I misnamed the function. maybe kmalloc_fix_flags()?