Received: by 2002:ab2:7407:0:b0:1f4:b336:87c4 with SMTP id e7csp286020lqn; Fri, 12 Apr 2024 01:01:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVTPIQ+ZUNPkckYgGJ8M4zaGGE69lrejjEN0+/4xufqDeCy8GuDiIoqa4yDOlMt1BT3+9n+XFHXPXNCGlfvNmkHTui3fDr30JG3aq2TTw== X-Google-Smtp-Source: AGHT+IHWg59eVKChl9WJxqK1MB5mYbtLSkjSDUkzVL9dQEdzG3t6wdKtCwJtrOBI9sSDzNP0FJto X-Received: by 2002:a17:907:7e8c:b0:a51:abb0:a8a2 with SMTP id qb12-20020a1709077e8c00b00a51abb0a8a2mr1543295ejc.42.1712908901134; Fri, 12 Apr 2024 01:01:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712908901; cv=pass; d=google.com; s=arc-20160816; b=X9UZRoay/VMOKy3Puj0IJD5Yx7WnZ4A3vqAyT6Z7S6clqSlHKm1622FR46S0JGUokB LrNCoIWktAQW7YsXzqNeTwZvWyl9KvL0uCf4hxqsoHhl+kRAWXKn+FMN4W5Y+A2197sr bkCXUy39oT0CKS0LWohCalzQ41twwZtZdeAgZaWzG13DPgTVXOCsy6FtmRQuHVZHxjcv DHocu6AynHgiDIEQaY7pI42eRCeUBj7AvEhgbYQLN20tAsgMlLagozymqlzeXP16CEHI /Rj/xXTiVEeEmriT8t2s0/hdpaVRpzWqOISar1EF97UHLmL3kFZfaBhv9gLlXHtZzQkT 8ITA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature:dkim-signature:dkim-signature:dkim-signature; bh=JIUc1Cqz4RPVX2SIpYjGWH2HQMZ9B7ak3+uxMlPbKCI=; fh=ZUcgfvVHVMK94c/fiEpI8hGESQ6XILTn9zz8HR9VifQ=; b=Zc8bPVIKgwNM7fF6Qcals5XTi7w6926JdGZJtwJTdvTjWMna/8i5Le+Pr1c8mBWfAg FhIf0qgYNqEIAywy00C40pRp5GADOS3rh2dCtlfM9EJ9XJI5BxrZ2en+Y8p4IApsFqZH CaYY5wsrn+aUQYx/olcSQCgfiycAJupRI4Q8jMrkiBlWYQ7Qd0AWgeqIm+ZyIT9Ma/+O AojGRVT3SscijyReqz68v1fHuhofwhMRsfgMi6ac2WaouJPDIxJMOG7HT8YE2NuUxU2T Eu1dPkG9U2CV2Oj8jgetAYEIsUL1+aCrcPMUk61E9JQotap9lMQ+jesiaYmvqQBxgSIB Ya5g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=I3nsKH8T; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=I3nsKH8T; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=jgmnYoXA; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-142190-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142190-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id l14-20020a170906794e00b00a51deebdcbcsi1481925ejo.410.2024.04.12.01.01.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 01:01:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-142190-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=I3nsKH8T; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=I3nsKH8T; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=jgmnYoXA; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-142190-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142190-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id AF2981F22630 for ; Fri, 12 Apr 2024 08:01:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6D1D24E1D5; Fri, 12 Apr 2024 08:01:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="I3nsKH8T"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="jgmnYoXA"; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="I3nsKH8T"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="jgmnYoXA" Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D87961CD04 for ; Fri, 12 Apr 2024 08:01:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712908893; cv=none; b=GtYbVDkHBq9ZIRIKwn228VqL3foeVzxinctSoogjxX2925FmARdJOcLGfukGuNcKt3j0N7WWulLQeppvycWXjcfLGZd9jg18a6q1Jm1LhJkJaBnZSfJeMkIVTkVTgEtdsQ+7vwT2XN9RrardmS6Afbo1g9B6JacwGA8SmxLnyXg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712908893; c=relaxed/simple; bh=xLHcNi08PM81Tq2UCF3td14VXetdDycTn4NlNFg8nug=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=NW1rXkseiM1GTWF1lzZSHthk6WEnnIYUNnp3psXoVnDv2VExsXDUSmKx1+dSxciGTSIZi5Q54OMJLwM9kzcg7xJgn/m3mBbrFanX4x6WyCu/z/shvSy3I8J6+8eMjL/Tjvyn9mvTTT3FUTLvtgRpB3sMvBXRs/aJz7LSpS6r3no= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=I3nsKH8T; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=jgmnYoXA; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=I3nsKH8T; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=jgmnYoXA; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id A0FF85F9E3; Fri, 12 Apr 2024 08:01:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1712908889; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=JIUc1Cqz4RPVX2SIpYjGWH2HQMZ9B7ak3+uxMlPbKCI=; b=I3nsKH8TD3BUGn8Rqu5l/op1xkSbJBqzJCJ4WbDEH6LR1t+f0134Pg/2RkTxAvJMtdhqtD IyUrUpYuNsUbgem1c+akoSdrpo9SifDOSP8NRFkUAHN70Ec+lo9TbOvmzKqDJKXvvzcQaA uAItrAWbVWTJpmkoqtjg3VY8m3ranzM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1712908889; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=JIUc1Cqz4RPVX2SIpYjGWH2HQMZ9B7ak3+uxMlPbKCI=; b=jgmnYoXAr28Wi81ZFRAjJ+1VPZ4VEYGQhXmF1vJ4LxReWEyQ08wkPeuA0OgExT1vzqckTT LREsdcM4HNcVBcAg== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1712908889; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=JIUc1Cqz4RPVX2SIpYjGWH2HQMZ9B7ak3+uxMlPbKCI=; b=I3nsKH8TD3BUGn8Rqu5l/op1xkSbJBqzJCJ4WbDEH6LR1t+f0134Pg/2RkTxAvJMtdhqtD IyUrUpYuNsUbgem1c+akoSdrpo9SifDOSP8NRFkUAHN70Ec+lo9TbOvmzKqDJKXvvzcQaA uAItrAWbVWTJpmkoqtjg3VY8m3ranzM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1712908889; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=JIUc1Cqz4RPVX2SIpYjGWH2HQMZ9B7ak3+uxMlPbKCI=; b=jgmnYoXAr28Wi81ZFRAjJ+1VPZ4VEYGQhXmF1vJ4LxReWEyQ08wkPeuA0OgExT1vzqckTT LREsdcM4HNcVBcAg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 8630C13942; Fri, 12 Apr 2024 08:01:29 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id EyVLIFnqGGY1dQAAD6G6ig (envelope-from ); Fri, 12 Apr 2024 08:01:29 +0000 Message-ID: <5d3c4a5e-0c27-4058-adf1-91e9602e5ccb@suse.cz> Date: Fri, 12 Apr 2024 10:01:29 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] slub: Clear __GFP_COMP flag when allocating 0 order page Content-Language: en-US To: "Christoph Lameter (Ampere)" , Haifeng Xu , Matthew Wilcox Cc: penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, roman.gushchin@linux.dev, 42.hyeyoo@gmail.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20240411091832.608280-1-haifeng.xu@shopee.com> <5482360c-0a0b-e5f5-b88e-4a6ec4d43f7d@linux.com> From: Vlastimil Babka Autocrypt: addr=vbabka@suse.cz; keydata= xsFNBFZdmxYBEADsw/SiUSjB0dM+vSh95UkgcHjzEVBlby/Fg+g42O7LAEkCYXi/vvq31JTB KxRWDHX0R2tgpFDXHnzZcQywawu8eSq0LxzxFNYMvtB7sV1pxYwej2qx9B75qW2plBs+7+YB 87tMFA+u+L4Z5xAzIimfLD5EKC56kJ1CsXlM8S/LHcmdD9Ctkn3trYDNnat0eoAcfPIP2OZ+ 9oe9IF/R28zmh0ifLXyJQQz5ofdj4bPf8ecEW0rhcqHfTD8k4yK0xxt3xW+6Exqp9n9bydiy tcSAw/TahjW6yrA+6JhSBv1v2tIm+itQc073zjSX8OFL51qQVzRFr7H2UQG33lw2QrvHRXqD Ot7ViKam7v0Ho9wEWiQOOZlHItOOXFphWb2yq3nzrKe45oWoSgkxKb97MVsQ+q2SYjJRBBH4 8qKhphADYxkIP6yut/eaj9ImvRUZZRi0DTc8xfnvHGTjKbJzC2xpFcY0DQbZzuwsIZ8OPJCc LM4S7mT25NE5kUTG/TKQCk922vRdGVMoLA7dIQrgXnRXtyT61sg8PG4wcfOnuWf8577aXP1x 6mzw3/jh3F+oSBHb/GcLC7mvWreJifUL2gEdssGfXhGWBo6zLS3qhgtwjay0Jl+kza1lo+Cv BB2T79D4WGdDuVa4eOrQ02TxqGN7G0Biz5ZLRSFzQSQwLn8fbwARAQABzSBWbGFzdGltaWwg QmFia2EgPHZiYWJrYUBzdXNlLmN6PsLBlAQTAQoAPgIbAwULCQgHAwUVCgkICwUWAgMBAAIe AQIXgBYhBKlA1DSZLC6OmRA9UCJPp+fMgqZkBQJkBREIBQkRadznAAoJECJPp+fMgqZkNxIQ ALZRqwdUGzqL2aeSavbum/VF/+td+nZfuH0xeWiO2w8mG0+nPd5j9uj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JGEACOKABgo9wJXsbWhGWYO7mD 8R8mUyJHqbvaz+yTLnvRwfe/VwafFfDMx5GYVYzMY9TWpA8psFTKTUIIQmx2scYsRBUwm5VI EurRWKqENcDRjyo+ol59j0FViYysjQQeobXBDDE31t5SBg++veI6tXfpco/UiKEsDswL1WAr tEAZaruo7254TyH+gydURl2wJuzo/aZ7Y7PpqaODbYv727Dvm5eX64HCyyAH0s6sOCyGF5/p eIhrOn24oBf67KtdAN3H9JoFNUVTYJc1VJU3R1JtVdgwEdr+NEciEfYl0O19VpLE/PZxP4wX PWnhf5WjdoNI1Xec+RcJ5p/pSel0jnvBX8L2cmniYnmI883NhtGZsEWj++wyKiS4NranDFlA HdDM3b4lUth1pTtABKQ1YuTvehj7EfoWD3bv9kuGZGPrAeFNiHPdOT7DaXKeHpW9homgtBxj 8aX/UkSvEGJKUEbFL9cVa5tzyialGkSiZJNkWgeHe+jEcfRT6pJZOJidSCdzvJpbdJmm+eED w9XOLH1IIWh7RURU7G1iOfEfmImFeC3cbbS73LQEFGe1urxvIH5K/7vX+FkNcr9ujwWuPE9b 1C2o4i/yZPLXIVy387EjA6GZMqvQUFuSTs/GeBcv0NjIQi8867H3uLjz+mQy63fAitsDwLmR EP+ylKVEKb0Q2A== In-Reply-To: <5482360c-0a0b-e5f5-b88e-4a6ec4d43f7d@linux.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Level: X-Spamd-Result: default: False [-1.15 / 50.00]; SUSPICIOUS_RECIPS(1.50)[]; BAYES_HAM(-1.36)[90.60%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; RCVD_TLS_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_SEVEN(0.00)[11]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[kernel.org,google.com,lge.com,linux-foundation.org,linux.dev,gmail.com,kvack.org,vger.kernel.org]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns] X-Spam-Score: -1.15 X-Spam-Flag: NO On 4/11/24 6:51 PM, Christoph Lameter (Ampere) wrote: > On Thu, 11 Apr 2024, Haifeng Xu wrote: > >> @@ -1875,6 +1875,13 @@ static inline struct slab *alloc_slab_page(gfp_t flags, int node, >> struct slab *slab; >> unsigned int order = oo_order(oo); >> >> + /* >> + * If fallback to the minimum order allocation and the order is 0, >> + * clear the __GFP_COMP flag. >> + */ >> + if (order == 0) >> + flags = flags & ~__GFP_COMP; > > > This would be better placed in allocate_slab() when the need for a > fallback to a lower order is detected after the first call to alloc_slab_page(). Yeah. Although I don't really see the harm of __GFP_COMP with order-0 in the first place, if the only issue is that the error output might be confusing. I'd also hope we should eventually get rid of those odd non-__GFP_COMP high-order allocations and then can remove the flag.