Received: by 2002:a05:7208:c24f:b0:81:d631:dc8 with SMTP id w15csp403262rbd; Thu, 4 Apr 2024 12:46:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVkV+R6KltEREVPk2lEUcvO7IDQ46l+4HLxEypfQhNAaOTg8xZueia6O+k9RePR5ke+cwV+UwHIE09NfZGDMmRXz9bNFu9AVXVipzWUGg== X-Google-Smtp-Source: AGHT+IE78SDgOFM9EvAjnvVYHnUfJWEVT1h0RvSRhhwmF0itZYmbH9ucCedztGCszMTt0Pe7Rbgb X-Received: by 2002:a17:90a:ac0f:b0:29d:dfae:4fac with SMTP id o15-20020a17090aac0f00b0029ddfae4facmr720487pjq.23.1712259966799; Thu, 04 Apr 2024 12:46:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712259966; cv=pass; d=google.com; s=arc-20160816; b=sgSJ4seumU2HknGuV8ChyMjd/lcHcWzfnralnjny35+866Zs7YSDH8OhNgBBmbVWMo QMNJvR36SvtzHrdSsUwGvBwacnn9gs/VMzbDZcBdJPq9eVt6NsWbMDGfarWSEZHIF90C SQS0fL9JglxgsId1V+EVoFUKISrndL90dm7FhKuWuuHUaj+0mn/uMI63Xp1AichMj+6/ Y5vqH6FEyq2LATiiIlq1CUBtKtxWXatj8UGn4sL6dt8NXjU5NwgXSW4Ty6g9In5jT/+k pVbdZFid6KeBMCy6jBPUYmLAJe4/fq0/1JqUCTYzPD9ysA8xXQgWKRFN3ApZyQbSjx8G GCzg== 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=/KQCu/mltfEoKC40v/KKp9haeZEk1fmHGzak7UrYD5I=; fh=whrE+rUfoXzTto+Q91I6aTAr73OxHa9dD2ULxFapcjk=; b=KTJTOzer8l7EtaC3MNEACJWwJ3ez/NZbJvRPXKAMxe7uhx+31vWkwwNVqQAMCgQ3sv XSmPtW+3Ou0uRohUvNDydABKieVQBDmIeyk9fuq4p/bcYL8vgU7jY87/pu/JjoWtVUO/ 3id5Tik4WA+/3W6u7CRuY2SS2Iih5soNzLq+g9NDWyyo/Diy/nOqL6bOYlZ8EjgQ0OZD XvoB6dVQ57EMKKjDCEcH9Sm6oTws2gHVIuwVBRM2gqU8y+QEVYxYInugTy/HoY03JNTv NytuMEutmRe23jBC7CNiDkUufSuJbloxWX8Nsck66dbSr79Qf1PyXg4sEBKqXa3N3NtW +Mjw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-132022-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132022-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linux.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id gt18-20020a17090af2d200b002a257c52f92si95838pjb.168.2024.04.04.12.46.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 12:46:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-132022-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-132022-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132022-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id A0744B24F2C for ; Thu, 4 Apr 2024 19:18:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 164161339A2; Thu, 4 Apr 2024 19:18:50 +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 93EB513119B for ; Thu, 4 Apr 2024 19:18:47 +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=1712258329; cv=none; b=U0NZEn6DC54ETWsLyTFRsbVn90+v5Gl0gjbPeMKuQ8GaHkoGlELfgjuOifISQaVEGWPEPTdHQOoxkBDE6oF0k83yAXIJZrKqlIaY1ujLX+yh3DqsnSvXcRHW/xwy37CJPv/WDd/Zcrrdc3PYVeVidzOUirYjLRqGO6PSVtkHycU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712258329; c=relaxed/simple; bh=DRsq6B7gNf90bJWvlcjXsjCsytFzxuTCVa12StodvOA=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=EDt/iFOdYacOLAa4nmomZBQHyzj7/d+dQc38n8fUmfeDYL/21/F+RuoScNt7NI7FrzlWVygB2eVsGZRcQIf+Co0ZZW/tIW9/9ergxb43E52qXonKKZcO9RevX8nm08gwvQ+70Jp628sPBri0AX4fy6ZylBFb18+FWbUH18c78CM= 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 172CA40A89; Thu, 4 Apr 2024 12:12:11 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 1506940A86; Thu, 4 Apr 2024 12:12:11 -0700 (PDT) Date: Thu, 4 Apr 2024 12:12:11 -0700 (PDT) From: "Christoph Lameter (Ampere)" To: Ming Yang cc: penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, vbabka@suse.cz, roman.gushchin@linux.dev, 42.hyeyoo@gmail.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, zhangliang5@huawei.com, wangzhigang17@huawei.com, liushixin2@huawei.com, alex.chen@huawei.com, pengyi.pengyi@huawei.com, xiqi2@huawei.com Subject: Re: [PATCH] slub: fix slub segmentation In-Reply-To: <20240402031025.1097-1-yangming73@huawei.com> Message-ID: <56193a2c-dadb-108d-4eaf-0a923fc4912b@linux.com> References: <20240402031025.1097-1-yangming73@huawei.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 Tue, 2 Apr 2024, Ming Yang wrote: > The key point of above allocation flow is: the slab should be alloced > from the partial of other node first, instead of the buddy system of > other node directly. If you use GFP_THISNODE then you will trigger a reclaim pass on the remote node. That could generate a performance regression. We already support this kind of behavior via the node_reclaim / zone_reclaiom setting in procfs. Please use that. The remote buildup of the partial pages can be addressed by changing the remote_node_defrag_ratio in the slabs. This will make slub scan remote nodes for partial slabs before going into the page allocator.