Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1018669pxb; Wed, 1 Sep 2021 15:26:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwk6uHiD7ZHtbw5qRKhEU4wfHr7J+/4ZCF2MoLTIYOy3L8/UdT/0AHQOR8K6SzWPYkwZuGf X-Received: by 2002:a05:6e02:1e09:: with SMTP id g9mr21310ila.198.1630535204882; Wed, 01 Sep 2021 15:26:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630535204; cv=none; d=google.com; s=arc-20160816; b=OnjfyizKOMPFFlkhdz5ZOrKGtlHanzIrp1houtcRx09stKUL3twmnFyDJIMk0AJKWF 5GvFeUOSvRuXbiRq+C79sZxHmpOMvAoMfV1Wo9alEK5PkmS2lAr/DzOO29kIfuzdzD9I BKT7kAmkfqOPYj4GcD047IokjLOooByp+ZxzFSDbDOIJUdsy0Jy2i3/7WjDyjUzqnWM7 Fa7oFGYEQUOoG/mDg3ygVyK6l28sMn4IKdDxTphruRIyjxglXFCUWoOcxOoodnaxl9Jc 4cHSnXE/7SH6gbR0llVlO/Fl7nehkAfjWJ5xLK+JSSe2a56nwg9PYJ9z04GtT+j9nCed Rp5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=ovzfigQ9PjumMi6vv/w8A1YnKSQyDl5eGNpklc8y6No=; b=ldVnTF4su52AzFnL0k1ZYJ350hpKHfRWLY6GF3zVGGxmnouSrJpZMGlJxidWPRIRdU HBYHOWiBtDq3p29i2SEJOLZfnZz5njrFZDR9irSpwCRGBak6hQBaxRIJfJVriXrGNJB4 WIMARaR23j0kYJTJoQhSOGpvV54ueAxswVsTlSTxTsx9h5pvSyeYU0DMPptTIZMNCgyp fhPDSX9qcvqTH2jhXiux1pIR2gvkoWC7ryQfv96/QXf5G3X8fHOSPeH8SbQWzW1Kak0+ CUrDBM9C9vrQrZJND3ykH7nTsGZSA+Q6BpeHnqD8Rsl0C66OuzMd4vLd+jhEWOqEh+PT bNuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=V3TDEpT3; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u3si757581jad.73.2021.09.01.15.26.33; Wed, 01 Sep 2021 15:26:44 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=V3TDEpT3; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344569AbhIARjP (ORCPT + 99 others); Wed, 1 Sep 2021 13:39:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:36576 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344571AbhIARjO (ORCPT ); Wed, 1 Sep 2021 13:39:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1630517897; 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=ovzfigQ9PjumMi6vv/w8A1YnKSQyDl5eGNpklc8y6No=; b=V3TDEpT3IuWaKkxiiB/W/KUd12D/Lq+VXHoJQfkLXug4dKTkfZsaHX5MYsqKT2Q1oQ9CYA LP4WwC3um/kMar0wvHieowBMkgbZeH2kc4T/OO1K8oO8AoczvNwHSnIkY5I62IiGSWSjfG ntQBU2cABvtjuQ/TcBHmhDO5cfJ91fs= 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-130-9TQ3AenOOs-ms0RjhFq3lg-1; Wed, 01 Sep 2021 13:38:16 -0400 X-MC-Unique: 9TQ3AenOOs-ms0RjhFq3lg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4EE37802921; Wed, 1 Sep 2021 17:38:15 +0000 (UTC) Received: from fuller.cnet (ovpn-112-3.gru2.redhat.com [10.97.112.3]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C6D7F5FC23; Wed, 1 Sep 2021 17:38:07 +0000 (UTC) Received: by fuller.cnet (Postfix, from userid 1000) id 983C64175292; Wed, 1 Sep 2021 14:32:04 -0300 (-03) Date: Wed, 1 Sep 2021 14:32:04 -0300 From: Marcelo Tosatti To: Nitesh Lal Cc: linux-kernel@vger.kernel.org, Nicolas Saenz Julienne , Frederic Weisbecker , Christoph Lameter , Juri Lelli , Peter Zijlstra , Alex Belits , Peter Xu Subject: Re: [patch V3 8/8] mm: vmstat_refresh: avoid queueing work item if cpu stats are clean Message-ID: <20210901173204.GA48995@fuller.cnet> References: <20210824152423.300346181@fuller.cnet> <20210824152646.948424573@fuller.cnet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 01, 2021 at 09:05:55AM -0400, Nitesh Lal wrote: > Hi Marcelo, > > On Tue, Aug 24, 2021 at 11:42 AM Marcelo Tosatti wrote: > > > > It is not necessary to queue work item to run refresh_vm_stats > > on a remote CPU if that CPU has no dirty stats and no per-CPU > > allocations for remote nodes. > > > > This fixes sosreport hang (which uses vmstat_refresh) with > > spinning SCHED_FIFO process. > > > > I was still able to reproduce the sosreport hang with this patchset and I > am wondering if that is because right now we do vmstat_sync and then cancel > any pending jobs on a CPU in the context of one task. Hi Nitesh, Did you use chisol (with proper flags) and the modified oslat? Tested with "echo 1 > /proc/sys/vmstat_refresh" and it was successful (no hangs). > However, while this task is running another process can come in and can > dirty the stats resulting in vmstat job getting placed on CPUs running > SCHED_FIFO tasks. > Am I missing something? > What we can probably do is to communicate that a CPU is running on task > isolation mode to any other process that is trying to run and schedule > jobs there. No, that can happen. Can use sched notifiers to handle this problem. Good point.