Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp420791ybt; Mon, 6 Jul 2020 12:36:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5DJ+g1Jai7DlwfoZ1nAn++ZYH+8o70FVfyRQ0tN3Ky4TYPbh1DlLc5xQyjwkwL7mAhu2N X-Received: by 2002:a05:6402:174e:: with SMTP id v14mr43176375edx.153.1594064176475; Mon, 06 Jul 2020 12:36:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594064176; cv=none; d=google.com; s=arc-20160816; b=zV4qxI0HWgVMAToEgVYJJwa13Eqx7tqo31w9FjRZESUhV/FqCFRmtQ8Hmrn3jwfZAh yUMdZ1TgPore7OgrSPuRFH3NJRmOD5xM1UM1pl0nb1cZur5s1gr5bfdCnx/K+Qzquhsw HLBwXv49cowHm9pJf/zspUQxPje2pVpnhBsGxyPzKsWgxuEtbKwCS0szCj+4w/UZ+ce3 rI+xhbFfGnirqDq+5yOR6WQxaLccrVUj4ZhEcK9kKwckQTHldeKTg/YUk/5r2z/Q+d82 3ifmuu776ENo5VJTbku62zOi3JKts5GEG6P9usmv9kMsc6KmMVHzstI8NWTw/vH36CFs wFfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=TfzJEfTLTJ4P1ctyxCSni+ndDmPhH7nFJL7iQ46u4s4=; b=UsRXX8usPKfNO9Ud3lT9mGyljwuFlivgFXZHcxER22Yj/51/kY/czPlZw9w5uP5StR meSS3xV/I8E3m+UZ98uL/CPlLrPrt7qPF/b0LtMk3PeycfgJWMnarUxnmZ5e0PVlFUC4 PeUu0uSGZ1YGbY4mEmTaIFtd0vLykrnOZ3O3obhBzN8uhgA5zrh3DoI0zSGITJ0X9tQ0 o6AbUAuq9gUdpliVKf7ahoYYzoAFcrmN/8eV/b8ZwCRW2mFx/2+AAl73vycVmiKWb2cb DQNE8G/+CRsalCIKib/kiU3CNJ6iYbIjSyisUBJp3KmzUUwEA/mAlGP6dyAKyYXz7wC1 OGJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h20si13328049eje.434.2020.07.06.12.35.53; Mon, 06 Jul 2020 12:36:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726572AbgGFTfO (ORCPT + 99 others); Mon, 6 Jul 2020 15:35:14 -0400 Received: from mga06.intel.com ([134.134.136.31]:49500 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725860AbgGFTfL (ORCPT ); Mon, 6 Jul 2020 15:35:11 -0400 IronPort-SDR: 3qnslLAeZ/X99kB2JIpsLiBQe/Z6xisKlJmvtbpDyWSQ9c1BF5d+84wYtKGE5czAIqFxPgItS0 qIl59TaszbOg== X-IronPort-AV: E=McAfee;i="6000,8403,9674"; a="209013624" X-IronPort-AV: E=Sophos;i="5.75,320,1589266800"; d="scan'208";a="209013624" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2020 12:35:10 -0700 IronPort-SDR: VSEbc/NmVuct6JehfGYreWWGi6iL6SJxGytq20wx7PTiWqEsAJmpXq2cGT2kTflRo9xJUlz5xV +NWdIuNIqSmQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,320,1589266800"; d="scan'208";a="322456978" Received: from chenyu-office.sh.intel.com ([10.239.158.173]) by FMSMGA003.fm.intel.com with ESMTP; 06 Jul 2020 12:35:08 -0700 From: Chen Yu To: Peter Zijlstra , Valentin Schneider Cc: Vincent Guittot , Ingo Molnar , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , linux-kernel@vger.kernel.org, Chen Yu Subject: [PATCH 0/2][RFC] Makes sd->flags sysctl writable Date: Tue, 7 Jul 2020 03:36:13 +0800 Message-Id: X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It was found that recently the flags of sched domain could not be customized via sysctl, which might make it a little inconenient for performance tuning/debugging. echo 343 > /proc/sys/kernel/sched_domain/cpu0/domain0/flags bash: flags: Permission denied 343 stands for: (SD_BALANCE_NEWIDLE SD_BALANCE_EXEC SD_BALANCE_FORK SD_WAKE_AFFINE) As mentioned in Commit 9818427c6270 ("sched/debug: Make sd->flags sysctl read-only"), the flags field is made read-only, due to the concerns that the sd flags and the per cpu cache domain pointer are not coherent. This trial patch tries to address the issue by updating the cache domain pointer once the flag has been modified. So that the sd->flags could be changed via sysctl. I'm not sure if there is other purpose that we've set the flags to read-only, but it seems that keeping the sd->flags writable could help diagnose the system easier. Any comment would be appreciated. Chen Yu (2): sched/topology: Add update_domain_cpu() sched/debug: Make sd->flags sysctl writable again include/linux/sched/topology.h | 5 +++++ kernel/sched/debug.c | 30 +++++++++++++++++++++++++++--- kernel/sched/topology.c | 11 +++++++++++ 3 files changed, 43 insertions(+), 3 deletions(-) -- 2.17.1