Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp422736rdg; Tue, 10 Oct 2023 14:40:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IETutuMnIyrFY9FsgZFG1GLcUR2RHXhJ56Liycymj4SYngFAMdfbSQRuabmyw+T7ay1YVfD X-Received: by 2002:a05:6a20:ce9a:b0:16e:f577:657c with SMTP id if26-20020a056a20ce9a00b0016ef577657cmr5598893pzb.31.1696974035162; Tue, 10 Oct 2023 14:40:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696974035; cv=none; d=google.com; s=arc-20160816; b=iXbnF6aiYxhJkfk1hwIZgc9FsxJ7T7pHT7b6FCDV/luqr4lR3DVWzNSa+3NTpFRs53 H2hruwAx8nSWqRpfUBtyNEq3bNL881fb2o/xFosN1ZV9GSAEweqbITVxwLqL64O9M5eG dluh9PCgqioxLDrnR3mFbl7VBheEiK6kvEy6+v6OrNxpwrUA86geyirT3ITSviHUAnBV AQCGfl2eUj5I+4hPCT913ThisYQudKILL9ZGnUdByNaPMdkpR4PmZ1XbWnIU0C0AOdwA 1e5ecYL7CA3N0pVKzZ83o4gPlifVZkAuIHhlG9tWO0eohyU29siZual1Tv3S3MC914vQ 5yKA== 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:sender:dkim-signature; bh=TsPRHA98FhrwhRKg+R8NI3J52+4rr5kRhI+cS2n4Rj0=; fh=vgCd2KEEgpF1RttkwZBI0tlZUk6+JVlbpQ8gPj30fSE=; b=kdj2NyVPNnNDCWS8fuMXnSqTchBy6eOij6Vf4JAOoJsU6PoZ/it+1f3qn3B4NVm0UE WwQXqn1WKd8o/dbdEGoa+ClaMAT1J4W+R1EY0itCfGkiErNgdBfR+tDmCznA07wyHtyV TTapjEZx++Htg5t/hxMkHQEkCgbHfQy4/k1Ki40Qu1FJEFG/VWp6Hg2O7itwk8vUdfYl IzKcpuD2BMfpm+inDfapu5OEOpe666A1E/zNWETnHBzrqTN5x7BEJRJxjN5gFO6Z2F11 Rfaa7XdMz9nIKYDMCa8CBsiunFzEmc2lV9Euo8UOHdpMcgQpgJpTYBsC80tdOdMpQzTK OWEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Iqv56Z5Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id ch7-20020a056a00288700b006901a8f5dadsi10523786pfb.289.2023.10.10.14.40.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 14:40:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Iqv56Z5Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 048D081CDBB6; Tue, 10 Oct 2023 14:40:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344147AbjJJVj4 (ORCPT + 99 others); Tue, 10 Oct 2023 17:39:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344145AbjJJVjx (ORCPT ); Tue, 10 Oct 2023 17:39:53 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAE0498 for ; Tue, 10 Oct 2023 14:39:48 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-53b962f09e0so5664123a12.0 for ; Tue, 10 Oct 2023 14:39:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696973987; x=1697578787; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=TsPRHA98FhrwhRKg+R8NI3J52+4rr5kRhI+cS2n4Rj0=; b=Iqv56Z5QIP4quk2rUjGH3GUYXkDAXWLPNw6EpEiFKOYZJFlRp7K3EU5Ldnel5rFjFk ozBQCpENyiHY9c+0tu6m8ZjZ5L7mOW4qbRlO6mI4UvgLVwTHurchwyQeicYI1JSfTsKA igRbtbr2KOTcSVe5J1SSdMVz2RLH1ZYS7LciKzEhjRTluZK1yTPfRFoTFQhlw3/stLSI 3tr/xAEyWf4yBto8996AYXqI0Ad0sDJNLEAnPEKTHX4taYuOeykta48lnlpfvA6785ax 5uvgZDY4MC70z98GpxxFihEpx2WBQLEWnry/MKmKMW0swPtsAZR282UzAepTCEDO+/ky RTKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696973987; x=1697578787; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TsPRHA98FhrwhRKg+R8NI3J52+4rr5kRhI+cS2n4Rj0=; b=SVfKM1n/hmEHe1EePNI9hFHUGdkV2KSC+ebpEANuaTYWIFaTrFEJrypVXcNRidh/OQ KczNmIjks2/nDaw9MwZ7XxVquyVNbHe/vnWzohIR9uC5sbj+UA7Fz2d3f2KXGL3bQlWl dXoXElwl/o63A4PIPbn4KLeYriAwGPNbpYyACZ/800jAdfpcU3uj75UmPTPwyHiVSGru FzQoZt3DdxLwzUgtpMFFuc/yuMH7QIjUcuaopxS+TJ8CGYAuOT5u6Bhe7XNbG6QYt9r4 A924pMxF8Nksh7JxHLYR9GmEVnEq07nl6bhKorh8Nl0RGM1H9LtdndTF12MC7dxD8Ypa mAPA== X-Gm-Message-State: AOJu0Yz+yvT6jgDbL2zOJoOX3CH7nHrAcchFVJ+8M86+58ATJCd0istM qYjSjc8jZBscWFIJC1EXlICyOxlA5IU= X-Received: by 2002:a05:6402:60c:b0:531:35c4:8ca2 with SMTP id n12-20020a056402060c00b0053135c48ca2mr13383464edv.42.1696973987200; Tue, 10 Oct 2023 14:39:47 -0700 (PDT) Received: from gmail.com (1F2EF9FF.nat.pool.telekom.hu. [31.46.249.255]) by smtp.gmail.com with ESMTPSA id y20-20020aa7d514000000b00537708be5c6sm8191442edq.73.2023.10.10.14.39.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 14:39:46 -0700 (PDT) Sender: Ingo Molnar Date: Tue, 10 Oct 2023 23:39:44 +0200 From: Ingo Molnar To: Mel Gorman Cc: Peter Zijlstra , Raghavendra K T , K Prateek Nayak , Bharata B Rao , Ingo Molnar , LKML , Linux-MM Subject: Re: [PATCH 6/6] sched/numa: Complete scanning of inactive VMAs when there is no alternative Message-ID: References: <20231010083143.19593-1-mgorman@techsingularity.net> <20231010083143.19593-7-mgorman@techsingularity.net> <20231010095752.yueqcseg7p3xg5ui@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231010095752.yueqcseg7p3xg5ui@techsingularity.net> X-Spam-Status: No, score=2.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 10 Oct 2023 14:40:33 -0700 (PDT) X-Spam-Level: ** * Mel Gorman wrote: > > 64 (BITS_PER_LONG) feels a bit small, especially on larger machines running > > threaded workloads, and the kmalloc of numab_state likely allocates a full > > cacheline anyway, so we could double the hash size from 8 bytes (2x1 longs) ^--- 16 bytes > > to 32 bytes (2x2 longs) with very little real cost, and still have a long > > field left to spare? > > > > You're right, we could and it's relatively cheap. I would worry that as > the storage overhead is per-VMA then workloads for large machines may > also have lots of VMAs that are not necessarily using threads. So I think there would be *zero* extra per-vma storage overhead, because vma->numab_state is a pointer, with the structure kmalloc() allocated, which should round the allocation to cacheline granularity anyway: 64 bytes on NUMA systems that matter. So with the current size of 'struct vma_numab_state' of 36 bytes, we can extend it by 16 bytes with zero additional storage cost. And since there's no cost, and less hash collisions are always good, the change wouldn't need any other justification. :-) [ Plus the resulting abstraction for the definition of a larger bitmask would probably make future extensions easier. ] But ... it was just a suggestion. Thanks, Ingo