Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0539C433F5 for ; Thu, 18 Nov 2021 03:26:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CC2C9611C9 for ; Thu, 18 Nov 2021 03:26:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242713AbhKRD3n (ORCPT ); Wed, 17 Nov 2021 22:29:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241600AbhKRD3j (ORCPT ); Wed, 17 Nov 2021 22:29:39 -0500 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20704C061570 for ; Wed, 17 Nov 2021 19:26:40 -0800 (PST) Received: by mail-pf1-x432.google.com with SMTP id m14so4558610pfc.9 for ; Wed, 17 Nov 2021 19:26:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=YgqEwSaksHCsJ2Xk3ukFf6EiHTEDT7mkEiActroWWyQ=; b=hVnVE9+QsBt3sP6MbBEN8t8mleGbEOJlIYVQhZR1FgtC7MyBTk2zSA8S2cOOBFKzov 4io7fzgCxIC0WZX1AZ+LIBlVrkBxXYWrU2KTr4gxNAfyL3LENPXn8rjrIY+MCCVsOuto gFIXUlq/E+JRoJ6y/PXDlnTwmia3VmsXdqGMht4ezVCPQFv7Fvphy87WhoNBbZYmH2GA 4pOFjxsVHOhDYmQNcgwGdobwiGJDYbk5HVtZyAivkVI/QkixAw4KtIPUb26hJFhp2f0w 7gaTmvaGY7hNGhc6/nHQYYTMHiOK8flxSyfCFv7h7jJOuAuUyM+Z3UpkPSi6Msg+tNPK LN9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=YgqEwSaksHCsJ2Xk3ukFf6EiHTEDT7mkEiActroWWyQ=; b=Xt2SfH499+tLl+rI5VFMXj9eFuj9hy09N7EpFKgwwC8bfcxDKKreEQgz9v0W9NI2cz HTQ3gA2p7p36lz8Z6vnmHk1ih4OrdibF8DwUlG55xo1BykRZ1SLYmJb1/21r8dazH419 WWsDsXJWaXuJnUGEvnisAPsJkA00PTqmO+fBxwg6xUcwlJasmQP0z8mWE98OEpIjST6k 0pyZq/PP/tOC4sJ8xjzEcJlozqbmdMjHtdBUUdhZdPARz4sOoZRz9uWBdWpLM4ROJtSB HGqMD2kNelzQQswjpVNhwRQYjcRlpfah8k4ebURt7YqmTMNuARqFOp8C7qfPQ9pa5xDi Zxnw== X-Gm-Message-State: AOAM532ZvphwsluacsZ1tS/+aOVi64Ey8gjsCKlPPwZcFe/3dT231AbO E5wjsnELnSP3Nn6coZB4u1hkIg== X-Google-Smtp-Source: ABdhPJxPC/wgO01gLT38/YulI8aGZPE5vGabnciA7zJcJTyPkzEDRPImeJCfQ5MSUJ/sxOB4b9nvJQ== X-Received: by 2002:aa7:811a:0:b0:44c:b9ef:f618 with SMTP id b26-20020aa7811a000000b0044cb9eff618mr12061528pfi.9.1637205999727; Wed, 17 Nov 2021 19:26:39 -0800 (PST) Received: from [10.76.43.192] ([61.120.150.76]) by smtp.gmail.com with ESMTPSA id x33sm1046264pfh.133.2021.11.17.19.26.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Nov 2021 19:26:39 -0800 (PST) Message-ID: Date: Thu, 18 Nov 2021 11:26:30 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Subject: Re: Re: Re: Re: Re: Re: Re: Re: [PATCH v1] sched/numa: add per-process numa_balancing Content-Language: en-US To: Mel Gorman Cc: Jonathan Corbet , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Daniel Bristot de Oliveira , linux-api@vger.kernel.org, LKML , linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org References: <20211029083751.GR3891@suse.de> <20211109091951.GW3891@suse.de> <7de25e1b-e548-b8b5-dda5-6a2e001f3c1a@bytedance.com> <20211109121222.GX3891@suse.de> <117d5b88-b62b-f50b-32ff-1a9fe35b9e2e@bytedance.com> <20211109162647.GY3891@suse.de> <08e95d68-7ba9-44d0-da85-41dc244b4c99@bytedance.com> <20211117082952.GA3301@suse.de> <816cb511-446d-11eb-ae4a-583c5a7102c4@bytedance.com> <20211117101008.GB3301@suse.de> From: Gang Li In-Reply-To: <20211117101008.GB3301@suse.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/17/21 6:10 PM, Mel Gorman wrote: > On Wed, Nov 17, 2021 at 05:38:28PM +0800, Gang Li wrote: >> If those APIs are ok with you, I will send v2 soon. >> >> 1. prctl(PR_NUMA_BALANCING, PR_SET_THP_DISABLE); > > It would be (PR_SET_NUMAB_DISABLE, 1) > >> 2. prctl(PR_NUMA_BALANCING, PR_SET_THP_ENABLE); > > An enable prctl will have the same problems as > prctl(PR_NUMA_BALANCING, PR_SET_NUMA_BALANCING, 0/1) -- it should have > meaning if the numa_balancing sysctl is disabled. > >> 3. prctl(PR_NUMA_BALANCING, PR_GET_THP); >> > > PR_GET_NUMAB_DISABLE > How about this: 1. prctl(PR_NUMA_BALANCING, PR_SET_NUMAB_DEFAULT); //follow global 2. prctl(PR_NUMA_BALANCING, PR_SET_NUMAB_DISABLE); //disable 3. prctl(PR_NUMA_BALANCING, PR_SET_NUMAB_ENABLE); //enable 4. prctl(PR_NUMA_BALANCING, PR_GET_NUMAB); PR_SET_NUMAB_DISABLE/ENABLE can always have meaning whether the numa_balancing sysctl is disabled or not, -- Thanks, Gang Li