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=-4.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 6232EC432BE for ; Mon, 26 Jul 2021 23:14:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4413860F6E for ; Mon, 26 Jul 2021 23:14:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233876AbhGZWdt (ORCPT ); Mon, 26 Jul 2021 18:33:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233380AbhGZWds (ORCPT ); Mon, 26 Jul 2021 18:33:48 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7154EC061757; Mon, 26 Jul 2021 16:14:15 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id c16so7966732plh.7; Mon, 26 Jul 2021 16:14:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=XlqO27qrjwfCjHyqQRAvgHsZUjwQ3+Wx+UdEzbB2q48=; b=fRN69KFrOsFKhC2wPvWFRZ/lnteV9fg9+31gTf41zkgI2F9buQPBEFwJzW0MB6O4Oe wbOo2wBtauY2JNE2Es8k6waNss5Vw0BX8xPVea3oDO4fJ9jKOr6sS2LHoo1y8K4sbxyZ 1trKsdUAnNYAkpcNBgYH9+nRiZCRSZ/UvkUVXsc83HoWX7WotrEGFSs1PESiqR750pF8 tCF5b2p30Bz6nwkKpK9sadVCdlO78fny0DclfIdUzp84h3/7cRl5qvq+NOab7ih1QhKb GJghNMn5cAfg603IjJOMJ9TNzkWgepc3XsApEKc0WIIn8wkYKYyAefE2xCMayBhi9Idb kH4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=XlqO27qrjwfCjHyqQRAvgHsZUjwQ3+Wx+UdEzbB2q48=; b=YlAHErBuy5GdofhqVFQErvkQYiQGT1FXWfsTlfmEy9qosh6hlcPCb7zAEGifwekg8/ HEpc66K2yXedLHfQcGOY2AJgCqePsZUIYruwiFh+VhUjfN1T0pAfK6IxWokwTkWyf6Jv 3FpJra552HiArMZ43Y0R0ZtjPqBnEdhtnV1XZV+nO6m0Ug2FIjMiLkf7owBcllZrYjeC yJzHZ+mZ8eO7oIcgQ4Grmy6tdwi7Oj/IFZOYMAgUl0DG8mpR3gsnRjAhOY4lFpT+VY3W lzr/rzHjJMTZWMSvvoG/G/RqQ1Brdog5ojmo78HkjyCJPsZtWWKSttAZsAjxi7nZdCGg j/YQ== X-Gm-Message-State: AOAM531bxxhwFkQblo0J29tMu2Xd9vcExo/30xCS9lMXJ1naSf24aHRg yfqRhyJar+R1rz18POTgCBo= X-Google-Smtp-Source: ABdhPJxLjAnUPpcRcZsgE0dosF8P9RI3fz//g3BMrTbbGbNzUGV+1cFfL7iFyp0EdtRsJ8A66eTsPQ== X-Received: by 2002:a05:6a00:1c73:b029:328:6a4f:f22b with SMTP id s51-20020a056a001c73b02903286a4ff22bmr19949350pfw.17.1627341254748; Mon, 26 Jul 2021 16:14:14 -0700 (PDT) Received: from localhost (udp264798uds.hawaiiantel.net. [72.253.242.87]) by smtp.gmail.com with ESMTPSA id x189sm1296860pfx.99.2021.07.26.16.14.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 16:14:14 -0700 (PDT) Sender: Tejun Heo Date: Mon, 26 Jul 2021 13:14:12 -1000 From: Tejun Heo To: Waiman Long 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 , Frederic Weisbecker , Marcelo Tosatti , Michal =?iso-8859-1?Q?Koutn=FD?= Subject: Re: [PATCH v3 4/9] cgroup/cpuset: Enable event notification when partition become invalid Message-ID: References: <20210720141834.10624-1-longman@redhat.com> <20210720141834.10624-5-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210720141834.10624-5-longman@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 20, 2021 at 10:18:29AM -0400, Waiman Long wrote: > +static inline void notify_partition_change(struct cpuset *cs, > + int old_prs, int new_prs) > +{ > + if ((old_prs == new_prs) || > + ((old_prs != PRS_ERROR) && (new_prs != PRS_ERROR))) > + return; > + cgroup_file_notify(&cs->partition_file); I'd generate an event on any state changes. The user have to read the file to find out what happened anyway. Thanks. -- tejun