From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 767F3C49EA2 for ; Thu, 17 Jun 2021 02:53:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 51E16611CA for ; Thu, 17 Jun 2021 02:53:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230047AbhFQC4A (ORCPT ); Wed, 16 Jun 2021 22:56:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:28231 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229614AbhFQCz7 (ORCPT ); Wed, 16 Jun 2021 22:55:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623898432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yS1nM3ylxqu4LGWweeetnOJWhjHjFKRHgCRdFTmCJkE=; b=LWnI/2P1mWWpHcVVXlmMG6CZx5uMMQsX4C7mMkT7wbJrHDB5hLUxtEozVwEVi9cLiV31kb 6triXbuKTG8jop3lH//iMvtvckh2Ofsml0ktiol6e/BzgJXsl67qQahFaftYWLZgWqIzJQ BQlIj6drWeh0dGWeQ4FD6erz9nc3JR4= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-192-bCPNmimeOOydyhhjn2Vblw-1; Wed, 16 Jun 2021 22:53:51 -0400 X-MC-Unique: bCPNmimeOOydyhhjn2Vblw-1 Received: by mail-wr1-f71.google.com with SMTP id k3-20020a5d62830000b029011a69a4d069so2049441wru.21 for ; Wed, 16 Jun 2021 19:53:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=yS1nM3ylxqu4LGWweeetnOJWhjHjFKRHgCRdFTmCJkE=; b=ksvXyf7rMYAxcDqKhbyY9PjunFzr2+D4YguTN6lvAGVuUgJ0Xh4AK/JSjDef5cdkno vcAk94AX1LWwNtbLl+8uq7eilIQWEGXBVZup+QvsFWQcqfJkGs2N6pfvGw68Oh20e7QN TSbkYFQqKOKxYJh5UShAsULxGx5zYNCxxC2ubsVwQdNONGNikSxhYAFccKFgezNCD3mF 53H+qX8ZxXlvHqWWCPQsOCfuY8n1tuRgd8qSOvOY0saFl2/w8j5odOl7rokBwqINMFYm +i0q7MRKixXP4wXW7cxD1SOHprgUCgfMUQbLi+ML/nm06qoVQ13QcJy3RQGGsHDEiXWy KWcw== X-Gm-Message-State: AOAM533Vx3aE0cE1r3oaXcJEsmYWBoE1MYuWVsyZIc1hsOUTZahhlkLt jLteOfLFTYe/u+cDlOG4bpYzHma7bWREI1uMc0Ef81JKjDtefDIpxdkLiuSmixrUJrbAd6lGGUS daOwrhbw4ucyjYSP0jL013fGM X-Received: by 2002:a7b:c446:: with SMTP id l6mr583729wmi.171.1623898430169; Wed, 16 Jun 2021 19:53:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycogHw1ABakuf4er+UbRreN9lkhiUZ8wnSoK8E3G9KFZOhpUS4fGgk6OHwkh2KfEcm5Rr5Lw== X-Received: by 2002:a7b:c446:: with SMTP id l6mr583714wmi.171.1623898430048; Wed, 16 Jun 2021 19:53:50 -0700 (PDT) Received: from llong.remote.csb ([2601:191:8500:76c0::cdbc]) by smtp.gmail.com with ESMTPSA id n12sm3783427wrw.83.2021.06.16.19.53.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Jun 2021 19:53:49 -0700 (PDT) From: Waiman Long X-Google-Original-From: Waiman Long Subject: Re: [PATCH 1/5] cgroup/cpuset: Don't call validate_change() for some flag changes To: Tejun Heo Cc: Zefan Li , Johannes Weiner , Jonathan Corbet , Shuah Khan , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, Andrew Morton , Roman Gushchin , Phil Auld , Peter Zijlstra , Juri Lelli References: <20210603212416.25934-1-longman@redhat.com> <20210603212416.25934-2-longman@redhat.com> Message-ID: <4e4da272-ae34-4ff8-18bc-253e9c14a14c@redhat.com> Date: Wed, 16 Jun 2021 22:53:44 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/16/21 4:39 PM, Tejun Heo wrote: > Hello, > > On Thu, Jun 03, 2021 at 05:24:12PM -0400, Waiman Long wrote: >> The update_flag() is called with one flag bit change and without change >> in the various cpumasks in the cpuset. Moreover, not all changes in the >> flag bits are validated in validate_change(). In particular, the load >> balance flag and the two spread flags are not checked there. So there >> is no point in calling validate_change() if those flag bits change. > The fact that it's escaping validation conditionally from caller side is > bothersome given that the idea is to have self-contained verifier to ensure > correctness. I'd prefer to make the validation more complete and optimized > (ie. detect or keep track of what changed) if really necessary rather than > escaping partially because certain conditions aren't checked. Thanks for the comments. You are right. I will leave out this patch. Anyway, the rests of the patchset don't have a strict dependency on it. Cheers, Longman