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=-8.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 718ADC433FE for ; Fri, 4 Dec 2020 13:32:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1559622A83 for ; Fri, 4 Dec 2020 13:32:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1559622A83 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 85B6B6B005C; Fri, 4 Dec 2020 08:32:20 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8320F6B006C; Fri, 4 Dec 2020 08:32:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 729C66B006E; Fri, 4 Dec 2020 08:32:20 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0184.hostedemail.com [216.40.44.184]) by kanga.kvack.org (Postfix) with ESMTP id 5B69E6B005C for ; Fri, 4 Dec 2020 08:32:20 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 15CB2180AD804 for ; Fri, 4 Dec 2020 13:32:20 +0000 (UTC) X-FDA: 77555688840.27.blood76_2b00ef6273c4 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin27.hostedemail.com (Postfix) with ESMTP id EA0163D669 for ; Fri, 4 Dec 2020 13:32:19 +0000 (UTC) X-HE-Tag: blood76_2b00ef6273c4 X-Filterd-Recvd-Size: 5193 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by imf20.hostedemail.com (Postfix) with ESMTP for ; Fri, 4 Dec 2020 13:32:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607088738; 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: in-reply-to:in-reply-to:references:references; bh=A+oyWA7D9L/rOeSBRkyfx5NVGUtarBuBYj2CJKUoPEQ=; b=bpgW0yacZNqlY8W700haxNSvLGGUDWOOy2qipswJ42qSfZ1xb6uj/xt04YWmE2gSEQPLM+ 1G+ZBLMFSizO86ipgI/j46UWmYvdgBku3H+ZguWP8EPjhQvxbpkf++NaUORqf/kBW6H0hM eG8x9P3FAy8FSdvFixwSH+LzC4vSBWM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-478-yMF-OGDqOE2TpRfp5lfVbA-1; Fri, 04 Dec 2020 08:32:14 -0500 X-MC-Unique: yMF-OGDqOE2TpRfp5lfVbA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3D3AC10054FF; Fri, 4 Dec 2020 13:32:13 +0000 (UTC) Received: from fuller.cnet (ovpn-112-4.gru2.redhat.com [10.97.112.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DE7DA60875; Fri, 4 Dec 2020 13:32:12 +0000 (UTC) Received: by fuller.cnet (Postfix, from userid 1000) id 466E1416C99F; Fri, 4 Dec 2020 10:31:37 -0300 (-03) Date: Fri, 4 Dec 2020 10:31:37 -0300 From: Marcelo Tosatti To: Frederic Weisbecker 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: <20201204133137.GC5772@fuller.cnet> 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> <20201204002000.GA57685@lothringen> MIME-Version: 1.0 In-Reply-To: <20201204002000.GA57685@lothringen> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mtosatti@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 Fri, Dec 04, 2020 at 01:20:00AM +0100, Frederic Weisbecker wrote: > 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. Yes, this was annoying. Will extend the interface to split SET/GET per command as well (so its easier to know from which feature the error comes from), and use REQUEST to finally enter isolated mode. Thanks for the suggestion!