Received: by 2002:ab2:3b09:0:b0:1ed:14ea:9113 with SMTP id b9csp48258lqc; Thu, 29 Feb 2024 09:58:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXx6WQEBWZXJCR7MLykkqjRzEP6P5BdDHoek9wPN+lL7bz9KJ5RGpqp/eOore+WaeoQKnUq8/xuHCdOlmktrhCJVhedaXke0O6kuqWJJg== X-Google-Smtp-Source: AGHT+IGAnAEWmzzrREjGFUN/QufBHy4Oy+WM1jRGZQzCzMr3wKuLuKLVEznDqSYcBLIYJ85YWNfh X-Received: by 2002:a05:6a00:80ea:b0:6e5:265:fd31 with SMTP id ei42-20020a056a0080ea00b006e50265fd31mr2764997pfb.7.1709229495352; Thu, 29 Feb 2024 09:58:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709229495; cv=pass; d=google.com; s=arc-20160816; b=OamDgCR+6xZrfKgHenx/E4X5iNA5xw3EOv5A92ln6Rkr4J86nCmiSzUg8Ekc3QyDHX WPq9jv/SinJxzuEKuiYDtonTFbC2KlFAU9ZzrPYgW10gQksYJNkLULVFQkKw4Iv9SB/s 2r1kFjkfdIINo7J+tTHqQa5A5lvV4hr/yzfC9YxwcXb49Jjv/b0vewJtVCAtExPRTMDl GF7pfHURWcQ4hIwshjWa4kVjN6xqYB4nMdwxmMoJbD7H3ILusKnsHpJMSpg64FIrbggG KLfB4QRmcf2B7th6NNHY+u70KxrkXB6REdrJHKPL5Cv+Fq3Fq6DMEFLNg4Z75VaBkIap b0Jw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:from:date; bh=5Wp+AyboHC0olrldneAB6CoqX9tVuICucl0kdyRGC5Q=; fh=U37wJIhykufbCjUizp5z1otdOH+Ny1Ha/HTIDrfEr7k=; b=N1XNutn+PZArwR0kBVL/ySy4wOOezqT6NmSeaSWpWH4tpMtxLRJD+DYjcUeNb1h8h3 OP1oQ7p0gH9tafVbEE2kwE9vqFacJ2SkwPFf3tYqAkCo4bhzjERqd7cdI5DD7mXnfvUw cE3Ul0+SWwl9LiDhLAtxrRKDVNFhO40WLiOsVg7UhhECb30vYSSUf+8twt+JkaQZKZy4 O9prV6R1Dn5q+Y47AMbw5SHz+nmlRrycvgFfvBnbhdXrR53fiZelPAQeWaWgdJT7VMXS cYQc3MGLZxqoqeJLTKMU3PKCGkO8UjpLMWWNPYUyoRNmnfthYO+O0M6sSPXPE4YXHn5r Aeig==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-87221-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87221-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linux.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i134-20020a636d8c000000b005e438e99d3fsi1748994pgc.124.2024.02.29.09.58.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 09:58:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-87221-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-87221-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87221-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linux.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 0D016283DBE for ; Thu, 29 Feb 2024 17:58:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C8F797826D; Thu, 29 Feb 2024 17:57:47 +0000 (UTC) Received: from gentwo.org (gentwo.org [62.72.0.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 351E6757E0; Thu, 29 Feb 2024 17:57:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.72.0.81 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709229467; cv=none; b=lwONcK1eCgHodv1J6wt1gVXiKW/SRozQR7KT7wqMXIa75R6MynfrRePTS7KWMRXU9jrC64LaJPnSV+BR7+sCT8Vt3kY0EOhxUhngonBBgJqrLNHU1LanUyfLCHePKvwwH3K9RltqjpHnGmXTtW0xD7AKhIowEHgoxwoJzzYHRYg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709229467; c=relaxed/simple; bh=ble/WW7S/LMVFJMHqZsBCnHfwZb+W0WPZfC/b4f77tE=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=spuh/yuTLZQx3QbW7kJR8a+Hh6zOgJ8IHEk/xwBv9EoUpTDzJq7BZXDVrdj/o9Juv0jEN7yMIfLEIXaP4Cu8ZjXkG/of16NF53S+qRp30KEe7uHxBkp3c69klisL1U7wRKZ8uJRZHOmkDYku2o5COjCus0ThGQoTCPkbAvPt8NI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.com; spf=fail smtp.mailfrom=linux.com; arc=none smtp.client-ip=62.72.0.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=linux.com Received: by gentwo.org (Postfix, from userid 1003) id 03BAD40AB2; Thu, 29 Feb 2024 09:57:44 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 030E040AAD; Thu, 29 Feb 2024 09:57:44 -0800 (PST) Date: Thu, 29 Feb 2024 09:57:43 -0800 (PST) From: "Christoph Lameter (Ampere)" To: Eric Dumazet cc: Shijie Huang , Huang Shijie , kuba@kernel.org, patches@amperecomputing.com, davem@davemloft.net, horms@kernel.org, ast@kernel.org, dhowells@redhat.com, linyunsheng@huawei.com, aleksander.lobakin@intel.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH v2] net: skbuff: set FLAG_SKB_NO_MERGE for skbuff_fclone_cache In-Reply-To: Message-ID: <1e72ab23-8161-091e-dc9e-9ecfe84a02df@linux.com> References: <20240227062833.7404-1-shijie@os.amperecomputing.com> <018b5652-8006-471d-94d0-d230e4aeef6d@amperemail.onmicrosoft.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed On Thu, 29 Feb 2024, Eric Dumazet wrote: >> If you do not specify a node or GFP_THISNODE then the slub allocator will >> opportunistically allocate sporadically from other nodes to avoid >> fragmentation of slabs. The page allocator also will sporadically go off >> node in order to avoid reclaim. The page allocator may go off node >> extensively if there is a imbalance of allocation between node. The page >> allocator has knobs to tune off node vs reclaim options. Doing more >> reclaim will slow things down but give you local data. > > Maybe, maybe not. > > Going back to CONFIG_SLAB=y removes all mismatches, without having to > use GFP_THISNODE at all, > on hosts with plenty of available memory on all nodes. Slab uses GFPTHISNODE by default and does not respect the memory policies etc set for pages. As such it will causes additional overhead through reclaim passses etc and memory policies will not be applied on a per page level (as specd) but in its own layer on a per object basis. It causes additional fragmentation. > I think that is some kind of evidence that something is broken in SLUB land. That is one of the reasons that SLAB was removed. Slub defragmentation can be disabled by either GFP_THISNODE or tuning the remote_claim knob in /sys/kernel/slab/