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.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 7A100C433FE for ; Fri, 4 Dec 2020 00:20:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C6A22223E4 for ; Fri, 4 Dec 2020 00:20:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C6A22223E4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C16E46B0036; Thu, 3 Dec 2020 19:20:05 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BC7816B005C; Thu, 3 Dec 2020 19:20:05 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AB4BE6B0068; Thu, 3 Dec 2020 19:20:05 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0021.hostedemail.com [216.40.44.21]) by kanga.kvack.org (Postfix) with ESMTP id 9153E6B0036 for ; Thu, 3 Dec 2020 19:20:05 -0500 (EST) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 5CAEC180AD806 for ; Fri, 4 Dec 2020 00:20:05 +0000 (UTC) X-FDA: 77553692370.18.cloth23_21040a3273c0 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin18.hostedemail.com (Postfix) with ESMTP id 2E16C100EC661 for ; Fri, 4 Dec 2020 00:20:05 +0000 (UTC) X-HE-Tag: cloth23_21040a3273c0 X-Filterd-Recvd-Size: 3646 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf14.hostedemail.com (Postfix) with ESMTP for ; Fri, 4 Dec 2020 00:20:04 +0000 (UTC) Date: Fri, 4 Dec 2020 01:20:00 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607041203; bh=18dZEanR9eQbVKL4mSpTPbV5+mW1qNFZYbYn9AyiE/Q=; h=From:To:Cc:Subject:References:In-Reply-To:From; b=f69q9lbF4sImnTwG7alM3AkhnAiCkOtxGnQFAQhQL3HPIYQqi2jwC+SORCt7nwhck ykz7XrMTiYSE4413EkCZzoNDuFz50RwD4/tSXnrkpZfl5v/KPJ8k2KPKcdgv/ug9xc L0iowVp4nGsqj4kNVqpjg0LkuJ/AJQHcV7HeWVWMlAuhxRlRrLI3acwALFlou/VYDL KZU5GODUmyyCPiNXyG7nFbSBTC+lfrt+3vGkUrD/Jlv4WXv/g30lsTpmEEx8tWCPpV WylAW8aKNF3ivTA9ECGJx8fOn/sZ+TpRJAnwya8pzGUjGhaFY6FpbAxMLpneiLyB6Z 0q7eI0Xo5Bc9g== From: Frederic Weisbecker To: Marcelo Tosatti Cc: Thomas Gleixner , Arnaldo Carvalho de Melo , Christoph Lameter , Matthew Wilcox , linux-mm@kvack.org, Andrew Morton , Alex Belits , Phil Auld , Peter Zijlstra Subject: Re: [PATCH] mm: introduce sysctl file to flush per-cpu vmstat statistics Message-ID: <20201204002000.GA57685@lothringen> References: <20201117162805.GA274911@fuller.cnet> <20201117180356.GT29991@casper.infradead.org> <20201117202317.GA282679@fuller.cnet> <20201127154845.GA9100@fuller.cnet> <87h7p4dwus.fsf@nanos.tec.linutronix.de> <20201202183842.GC80090@fuller.cnet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201202183842.GC80090@fuller.cnet> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Dec 02, 2020 at 03:38:42PM -0300, Marcelo Tosatti wrote: > +Usage > +===== > +``PR_TASK_ISOLATION_FEATURES``: > + Returns the supported features. Features are defined > + at include/uapi/linux/isolation.h. > + > + Usage:: > + > + prctl(PR_TASK_ISOLATION_FEATURES, ifeat, 0, 0, 0); > + > + The 'ifeat' argument is a pointer to a struct isolation_features: > + > + struct isolation_features { > + __u32 flags; > + __u32 pad[3]; > + }; > + > + Where flags contains bit sets for the features the kernel supports. > + > + FIXME: describe error codes > + > +``PR_TASK_ISOLATION_SET``: > + Enables task isolation mode. The type of task isolation is specified > + via > + > + struct isolation_control { > + __u32 flags; > + __u32 pad[15]; > + }; > + > +``PR_TASK_ISOLATION_GET``: > + Retrieves the currently configured task isolation mode and > + parameters. So, I guess we can think of two kinds of calls here: * Modes, or isolation states: signal on disallowed kernel entry, arrange for not taking some IPIs toward delayed processing, etc... For such "mode" it makes sense to have set() and get(), because the mode can be turned on and off. * Oneshot requests: quiescing (eg: vmstat), flush some pending events. For that it makes no sense to have a get(). I would rather decouple the above with, for modes: PR_TASK_ISOLATION_SET PR_TASK_ISOLATION_GET And for oneshot requests: PR_TASK_ISOLATION_REQUEST Thanks.