Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2542035pxb; Mon, 18 Jan 2021 22:53:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJzxrzCivdHhYfMbKQJnnjKQKqgOpGzwrMHrNzjLGOGXy/12RJ+1NdX9e5JPmKSVolC27azQ X-Received: by 2002:a50:b746:: with SMTP id g64mr2282995ede.33.1611039238667; Mon, 18 Jan 2021 22:53:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611039238; cv=none; d=google.com; s=arc-20160816; b=IKg+GponduLiSFD8G2BunC4IoTEpolN5sJtEn385TFsacGL26q4nEwbTgjUz/VAwX4 NOOGdfQmUIGoHVMTJKr1z3q655GSPUFzV155xrg7eeh2ea4SWFM0pnDWEp5oDsfKS1wn 1NJVIHL6My5lShUcXB0B3WhzKnO8VO3H02FrsGxKuIBSL5qoKhRqsBEeTjrWcb8M2hSp WCSQPmppY9IPVVSxF9whovTWZlJy97nqhiYJ7gvWMCnm6UANux7Jmrlh/iplg7v6Hjfx EZ2e5l6aozA85HIMdpibvpY/+43uyqbRJKuQtZj4/M/wwwydX+G0uwpUga1JhhcuKuu/ 3FrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=of2CFzmdhltKV5PUh+hY23KC62xc9LrbOAc/9i7ZltQ=; b=c3SnM/KsM1Zwcg3PPg0tVgkET2mfgWnWj1Su/+fawZLJEJoaCcnfvezKU/utLSWGaf q+rxY54jyNSpSnpuiFzCwLYtLuMHv0l0Y2FykZ5uLWY+Xa+jBzOkjewulcGE/ovp5fb2 8ZXLu6m/lZ+x+fR+cduQGntH74wf76mHFIzO3gUaanhyVc53J9J0MBlEtlaz7DBZjCVU l7JM2PQq891m+1M4Mh67Igh/v6WikpSv5GP7WpaypnvjtJNKO4DnFHMdXBlshFsu/UHk 4+3f3U9tZjea2fybmO5f2esSlKLIH2ajO0urHHuaVpcnO0AakZNadc9bxrrK+TB5ZT5U YIbA== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j20si3290208ejb.278.2021.01.18.22.53.35; Mon, 18 Jan 2021 22:53:58 -0800 (PST) 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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727038AbhASGwr (ORCPT + 99 others); Tue, 19 Jan 2021 01:52:47 -0500 Received: from mail-lf1-f42.google.com ([209.85.167.42]:34464 "EHLO mail-lf1-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731303AbhASFdJ (ORCPT ); Tue, 19 Jan 2021 00:33:09 -0500 Received: by mail-lf1-f42.google.com with SMTP id o19so27376598lfo.1 for ; Mon, 18 Jan 2021 21:32:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=of2CFzmdhltKV5PUh+hY23KC62xc9LrbOAc/9i7ZltQ=; b=R/g4B8BCSEYiUKyomRvpdakPsaATNMyvHl+y+tIvZbMD2C/LVIcuoPkHhswQw5uCK1 KkVCW8PYHmOiRML+g/q/qM0hAdz7poTqA6zDLJV94KI00dyYe9pxFV2c9U1obmWIKZTm T8kZwoBVG8+wI4HqFtuWEho6pBsxpzWh2iuFbjDmoZ9bLxhIOYCKpCkZfA7MTvzeS2R2 NCXpTuVtSXAfWbDHKoUVFWzfjT7geI8wStPJ7ePvydpQ8S02Eq1LY10fxtP8B8u5c735 Exh7kuDbxUnBdkJpc+GtZ20uL2bQDITTf+aWaDKyifn0RL2lDCjdNT2kbQ7rb/x4efPh 3l8w== X-Gm-Message-State: AOAM5313YwG3fCPFNBoSiFaOL5FdeVgjpQ3aGQaLTyltSeLTI3OKMTFK bNeKJaMKoRelTjYT6ru8/bVoU2lxPlZbpuhT8EA= X-Received: by 2002:a19:23cf:: with SMTP id j198mr1154777lfj.509.1611034327181; Mon, 18 Jan 2021 21:32:07 -0800 (PST) MIME-Version: 1.0 References: <20210102220441.794923-1-jolsa@kernel.org> <20210102220441.794923-9-jolsa@kernel.org> In-Reply-To: <20210102220441.794923-9-jolsa@kernel.org> From: Namhyung Kim Date: Tue, 19 Jan 2021 14:31:55 +0900 Message-ID: Subject: Re: [PATCH 08/22] perf daemon: Add config file change check To: Jiri Olsa Cc: Arnaldo Carvalho de Melo , lkml , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Michael Petlan , Ian Rogers , Stephane Eranian , Alexei Budankov Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 3, 2021 at 7:05 AM Jiri Olsa wrote: > > Adding support to detect daemon's config file changes > and re-read the configuration when that happens. Hmm.. maybe some of the code in the previous commit can be moved here. Thanks, Namhyung > > Using inotify file descriptor pluged into the main > fdarray object for polling. > > Example: > > # cat ~/.perfconfig > [daemon] > base=/opt/perfdata > > [session-cycles] > run = -m 10M -e cycles --overwrite --switch-output -a > > Starting the daemon: > > # perf daemon start > > Check sessions: > > # perf daemon > [772262:daemon] base: /opt/perfdata > [772263:cycles] perf record -m 10M -e cycles --overwrite --switch-output -a > > Change '-m 10M' to '-m 20M', and check daemon log: > > # tail -f /opt/perfdata/output > [2021-01-02 20:31:41.234045] daemon started (pid 772262) > [2021-01-02 20:31:41.235072] reconfig: ruining session [cycles:772263]: -m 10M -e cycles --overwrite --switch-output -a > [2021-01-02 20:32:08.310137] reconfig: session 'cycles' killed > [2021-01-02 20:32:08.310847] reconfig: ruining session [cycles:772338]: -m 20M -e cycles --overwrite --switch-output -a > > And the session list: > > # perf daemon > [772262:daemon] base: /opt/perfdata > [772338:cycles] perf record -m 20M -e cycles --overwrite --switch-output -a > > Note the changed '-m 20M' option is in place. > > Signed-off-by: Jiri Olsa > ---