* Re: linux-next: Tree for Oct 5 (warnings: a. trace; b. mm/migrate)
[not found] <20211005190628.1f26b13d@canb.auug.org.au>
@ 2021-10-05 20:46 ` Randy Dunlap
2021-10-06 14:52 ` Dave Hansen
2021-10-06 21:22 ` Steven Rostedt
0 siblings, 2 replies; 11+ messages in thread
From: Randy Dunlap @ 2021-10-05 20:46 UTC (permalink / raw)
To: Stephen Rothwell, Linux Next Mailing List
Cc: Linux Kernel Mailing List, linux-mm, Andrew Morton, Steven Rostedt
On 10/5/21 1:06 AM, Stephen Rothwell wrote:
> Hi all,
>
> Changes since 20211001:
>
on x86_64:
a. randconfig: KCONFIG_SEED=0xBFBEA13C
../kernel/trace/trace.c:1712:13: error: 'trace_create_maxlat_file' defined but not used [-Werror=unused-function]
static void trace_create_maxlat_file(struct trace_array *tr,
b. randconfig: KCONFIG_SEED=0xFD1CE406
../mm/migrate.c:3216:22: error: 'migrate_on_reclaim_callback' defined but not used [-Werror=unused-function]
static int __meminit migrate_on_reclaim_callback(struct notifier_block *self,
^~~~~~~~~~~~~~~~~~~~~~~~~~~
../mm/migrate.c:3197:13: error: 'set_migration_target_nodes' defined but not used [-Werror=unused-function]
static void set_migration_target_nodes(void)
^~~~~~~~~~~~~~~~~~~~~~~~~~
(example usage to get the randconfig files:
KCONFIG_SEED=0xBFBEA13C make [ARCH=x86_64] randconfig
)
--
~Randy
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: linux-next: Tree for Oct 5 (warnings: a. trace; b. mm/migrate)
2021-10-05 20:46 ` linux-next: Tree for Oct 5 (warnings: a. trace; b. mm/migrate) Randy Dunlap
@ 2021-10-06 14:52 ` Dave Hansen
2021-10-06 14:56 ` Steven Rostedt
2021-10-06 16:33 ` Randy Dunlap
2021-10-06 21:22 ` Steven Rostedt
1 sibling, 2 replies; 11+ messages in thread
From: Dave Hansen @ 2021-10-06 14:52 UTC (permalink / raw)
To: Randy Dunlap, Stephen Rothwell, Linux Next Mailing List
Cc: Linux Kernel Mailing List, linux-mm, Andrew Morton, Steven Rostedt
On 10/5/21 1:46 PM, Randy Dunlap wrote:
> On 10/5/21 1:06 AM, Stephen Rothwell wrote:
>> Hi all,
>>
>> Changes since 20211001:
>
> on x86_64:
...
> b. randconfig: KCONFIG_SEED=0xFD1CE406
>
> ../mm/migrate.c:3216:22: error: 'migrate_on_reclaim_callback' defined
> but not used [-Werror=unused-function]
> static int __meminit migrate_on_reclaim_callback(struct notifier_block
> *self,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../mm/migrate.c:3197:13: error: 'set_migration_target_nodes' defined but
> not used [-Werror=unused-function]
> static void set_migration_target_nodes(void)
> ^~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
> (example usage to get the randconfig files:
> KCONFIG_SEED=0xBFBEA13C make [ARCH=x86_64] randconfig
> )
Hi Randy,
I'm having a heck of a time reproducing this one. Any chance you could
share an exact sha1 for the tree where you're hitting this, and maybe
even the actual .config (just in case the KCONFIG_SEED isn't working
somehow).
I've tried a few linux-next trees as well as the mmotm, mmots and
mainline with the culprit patch applied. No luck reproducing this so far.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: linux-next: Tree for Oct 5 (warnings: a. trace; b. mm/migrate)
2021-10-06 14:52 ` Dave Hansen
@ 2021-10-06 14:56 ` Steven Rostedt
2021-10-06 16:39 ` Randy Dunlap
2021-10-06 16:33 ` Randy Dunlap
1 sibling, 1 reply; 11+ messages in thread
From: Steven Rostedt @ 2021-10-06 14:56 UTC (permalink / raw)
To: Dave Hansen
Cc: Randy Dunlap, Stephen Rothwell, Linux Next Mailing List,
Linux Kernel Mailing List, linux-mm, Andrew Morton
On Wed, 6 Oct 2021 07:52:07 -0700
Dave Hansen <dave.hansen@intel.com> wrote:
> On 10/5/21 1:46 PM, Randy Dunlap wrote:
> > On 10/5/21 1:06 AM, Stephen Rothwell wrote:
> >> Hi all,
> >>
> >> Changes since 20211001:
> >
> > on x86_64:
> ...
> > b. randconfig: KCONFIG_SEED=0xFD1CE406
> >
> > ../mm/migrate.c:3216:22: error: 'migrate_on_reclaim_callback' defined
> > but not used [-Werror=unused-function]
> > static int __meminit migrate_on_reclaim_callback(struct notifier_block
> > *self,
> > ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> > ../mm/migrate.c:3197:13: error: 'set_migration_target_nodes' defined but
> > not used [-Werror=unused-function]
> > static void set_migration_target_nodes(void)
> > ^~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> >
> > (example usage to get the randconfig files:
> > KCONFIG_SEED=0xBFBEA13C make [ARCH=x86_64] randconfig
> > )
>
> Hi Randy,
>
> I'm having a heck of a time reproducing this one. Any chance you could
> share an exact sha1 for the tree where you're hitting this, and maybe
> even the actual .config (just in case the KCONFIG_SEED isn't working
> somehow).
>
> I've tried a few linux-next trees as well as the mmotm, mmots and
> mainline with the culprit patch applied. No luck reproducing this so far.
also, just sending the .config that broke would be much better than
supplying the seed you used to make it. I'm assuming if we don't use the
exact kernel image, with different configs available between versions, the
seed will produce different results.
Not to mention, I'll spend the time to look at a .config and less likely to
spend the time trying to figure out how to create that config.
-- Steve
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: linux-next: Tree for Oct 5 (warnings: a. trace; b. mm/migrate)
2021-10-06 14:52 ` Dave Hansen
2021-10-06 14:56 ` Steven Rostedt
@ 2021-10-06 16:33 ` Randy Dunlap
1 sibling, 0 replies; 11+ messages in thread
From: Randy Dunlap @ 2021-10-06 16:33 UTC (permalink / raw)
To: Dave Hansen, Stephen Rothwell, Linux Next Mailing List
Cc: Linux Kernel Mailing List, linux-mm, Andrew Morton, Steven Rostedt
[-- Attachment #1: Type: text/plain, Size: 1756 bytes --]
On 10/6/21 7:52 AM, Dave Hansen wrote:
> On 10/5/21 1:46 PM, Randy Dunlap wrote:
>> On 10/5/21 1:06 AM, Stephen Rothwell wrote:
>>> Hi all,
>>>
>>> Changes since 20211001:
>>
>> on x86_64:
> ...
>> b. randconfig: KCONFIG_SEED=0xFD1CE406
>>
>> ../mm/migrate.c:3216:22: error: 'migrate_on_reclaim_callback' defined
>> but not used [-Werror=unused-function]
>> static int __meminit migrate_on_reclaim_callback(struct notifier_block
>> *self,
>> ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> ../mm/migrate.c:3197:13: error: 'set_migration_target_nodes' defined but
>> not used [-Werror=unused-function]
>> static void set_migration_target_nodes(void)
>> ^~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>>
>> (example usage to get the randconfig files:
>> KCONFIG_SEED=0xBFBEA13C make [ARCH=x86_64] randconfig
>> )
>
> Hi Randy,
>
> I'm having a heck of a time reproducing this one. Any chance you could
> share an exact sha1 for the tree where you're hitting this, and maybe
> even the actual .config (just in case the KCONFIG_SEED isn't working
> somehow).
>
> I've tried a few linux-next trees as well as the mmotm, mmots and
> mainline with the culprit patch applied. No luck reproducing this so far.
>
Hi Dave,
This is just whatever is in linux-next-20211005, which looks like:
commit 29616f67fcbd (HEAD, tag: next-20211005, origin/master, origin/HEAD)
Author: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue Oct 5 19:00:37 2021 +1100
Add linux-next specific files for 20211005
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
I have 2 randconfig files that show this build warning.
One of them is attached.
--
~Randy
[-- Attachment #2: config-r9613.gz --]
[-- Type: application/gzip, Size: 25551 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: linux-next: Tree for Oct 5 (warnings: a. trace; b. mm/migrate)
2021-10-06 14:56 ` Steven Rostedt
@ 2021-10-06 16:39 ` Randy Dunlap
2021-10-06 18:16 ` Dave Hansen
0 siblings, 1 reply; 11+ messages in thread
From: Randy Dunlap @ 2021-10-06 16:39 UTC (permalink / raw)
To: Steven Rostedt, Dave Hansen
Cc: Stephen Rothwell, Linux Next Mailing List,
Linux Kernel Mailing List, linux-mm, Andrew Morton
[-- Attachment #1: Type: text/plain, Size: 1939 bytes --]
On 10/6/21 7:56 AM, Steven Rostedt wrote:
> On Wed, 6 Oct 2021 07:52:07 -0700
> Dave Hansen <dave.hansen@intel.com> wrote:
>
>> On 10/5/21 1:46 PM, Randy Dunlap wrote:
>>> On 10/5/21 1:06 AM, Stephen Rothwell wrote:
>>>> Hi all,
>>>>
>>>> Changes since 20211001:
>>>
>>> on x86_64:
>> ...
>>> b. randconfig: KCONFIG_SEED=0xFD1CE406
>>>
>>> ../mm/migrate.c:3216:22: error: 'migrate_on_reclaim_callback' defined
>>> but not used [-Werror=unused-function]
>>> static int __meminit migrate_on_reclaim_callback(struct notifier_block
>>> *self,
>>> ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> ../mm/migrate.c:3197:13: error: 'set_migration_target_nodes' defined but
>>> not used [-Werror=unused-function]
>>> static void set_migration_target_nodes(void)
>>> ^~~~~~~~~~~~~~~~~~~~~~~~~~
>>>
>>>
>>> (example usage to get the randconfig files:
>>> KCONFIG_SEED=0xBFBEA13C make [ARCH=x86_64] randconfig
>>> )
>>
>> Hi Randy,
>>
>> I'm having a heck of a time reproducing this one. Any chance you could
>> share an exact sha1 for the tree where you're hitting this, and maybe
>> even the actual .config (just in case the KCONFIG_SEED isn't working
>> somehow).
>>
>> I've tried a few linux-next trees as well as the mmotm, mmots and
>> mainline with the culprit patch applied. No luck reproducing this so far.
>
> also, just sending the .config that broke would be much better than
> supplying the seed you used to make it. I'm assuming if we don't use the
> exact kernel image, with different configs available between versions, the
> seed will produce different results.
>
> Not to mention, I'll spend the time to look at a .config and less likely to
> spend the time trying to figure out how to create that config.
OK, so a failed experiment. :(
The failing randconfig file is attached (for a. trace).
thanks.
--
~Randy
[-- Attachment #2: config-r9615.gz --]
[-- Type: application/gzip, Size: 38068 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: linux-next: Tree for Oct 5 (warnings: a. trace; b. mm/migrate)
2021-10-06 16:39 ` Randy Dunlap
@ 2021-10-06 18:16 ` Dave Hansen
0 siblings, 0 replies; 11+ messages in thread
From: Dave Hansen @ 2021-10-06 18:16 UTC (permalink / raw)
To: Randy Dunlap, Steven Rostedt
Cc: Stephen Rothwell, Linux Next Mailing List,
Linux Kernel Mailing List, linux-mm, Andrew Morton
[-- Attachment #1: Type: text/plain, Size: 1053 bytes --]
On 10/6/21 9:39 AM, Randy Dunlap wrote:
>>>> ../mm/migrate.c:3216:22: error: 'migrate_on_reclaim_callback' defined
>>>> but not used [-Werror=unused-function]
>>>> static int __meminit migrate_on_reclaim_callback(struct
>>>> notifier_block
>>>> *self,
>>>> ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>> ../mm/migrate.c:3197:13: error: 'set_migration_target_nodes' defined
>>>> but
>>>> not used [-Werror=unused-function]
>>>> static void set_migration_target_nodes(void)
>>>> ^~~~~~~~~~~~~~~~~~~~~~~~~~
>>>>
>>>>
>>>> (example usage to get the randconfig files:
>>>> KCONFIG_SEED=0xBFBEA13C make [ARCH=x86_64] randconfig
>>>> )
Randy, thanks for the .config! That did the trick.
Andrew, attached is a replacement patch for
mm-migrate-add-cpu-hotplug-to-demotion-ifdef.patch
I could do an incremental as well if that would be easier. But, the fix
here required a bit of a change of tactics from the original and
necessitated a rewrite of the changelog.
[-- Attachment #2: mm-migrate-separate-CPU-and-memory-hotplug-notifiers.patch --]
[-- Type: text/x-patch, Size: 4713 bytes --]
Subject: [PATCH] mm/migrate: separate CPU and memory hotplug notifiers
Date: Wed, 6 Oct 2021 11:08:46 -0700
Message-ID: <20211006180846.3321352-1-dave.hansen@intel.com>
X-Mailer: git-send-email 2.25.1
In-Reply-To: <20210924161255.E5FE8F7E@davehans-spike.ostc.intel.com>
References: <20210924161255.E5FE8F7E@davehans-spike.ostc.intel.com>
From: Dave Hansen <dave.hansen@linux.intel.com>
Once upon a time, the node demotion updates were driven solely by memory
hotplug events. But now, there are handlers for both CPU and memory
hotplug.
However, the #ifdef around the code checks only memory hotplug. A system
that has HOTPLUG_CPU=y but MEMORY_HOTPLUG=n would miss CPU hotplug events.
Update the #ifdef around the common code. Add memory and CPU-specific
option are off. Move some CPU-hotplug-specific functions to reside under
their specific #ifdef.
Link: https://lkml.kernel.org/r/20210924161255.E5FE8F7E@davehans-spike.ostc.intel.com
Fixes: 884a6e5d1f93 ("mm/migrate: update node demotion order on hotplug events")
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: "Huang, Ying" <ying.huang@intel.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Wei Xu <weixugc@google.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: David Rientjes <rientjes@google.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Greg Thelen <gthelen@google.com>
Cc: Yang Shi <yang.shi@linux.alibaba.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
---
mm/migrate.c | 78 +++++++++++++++++++++++++++++-----------------------
1 file changed, 44 insertions(+), 34 deletions(-)
diff --git a/mm/migrate.c b/mm/migrate.c
index a6311e46f605..5282157575ba 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -3066,7 +3066,7 @@ void migrate_vma_finalize(struct migrate_vma *migrate)
EXPORT_SYMBOL(migrate_vma_finalize);
#endif /* CONFIG_DEVICE_PRIVATE */
-#if defined(CONFIG_MEMORY_HOTPLUG)
+#if defined(CONFIG_MEMORY_HOTPLUG) || defined(CONFIG_HOTPLUG_CPU)
/* Disable reclaim-based migration. */
static void __disable_all_migrate_targets(void)
{
@@ -3198,35 +3198,7 @@ static void __set_migration_target_nodes(void)
goto again;
}
-/*
- * For callers that do not hold get_online_mems() already.
- */
-static void set_migration_target_nodes(void)
-{
- get_online_mems();
- __set_migration_target_nodes();
- put_online_mems();
-}
-
-/*
- * React to hotplug events that might affect the migration targets
- * like events that online or offline NUMA nodes.
- *
- * The ordering is also currently dependent on which nodes have
- * CPUs. That means we need CPU on/offline notification too.
- */
-static int migration_online_cpu(unsigned int cpu)
-{
- set_migration_target_nodes();
- return 0;
-}
-
-static int migration_offline_cpu(unsigned int cpu)
-{
- set_migration_target_nodes();
- return 0;
-}
-
+#if defined(CONFIG_MEMORY_HOTPLUG)
/*
* This leaves migrate-on-reclaim transiently disabled between
* the MEM_GOING_OFFLINE and MEM_OFFLINE events. This runs
@@ -3284,7 +3256,45 @@ static int __meminit migrate_on_reclaim_callback(struct notifier_block *self,
return notifier_from_errno(0);
}
-static int __init migrate_on_reclaim_init(void)
+static int __init migrate_on_reclaim_init_memhp(void)
+{
+ hotplug_memory_notifier(migrate_on_reclaim_callback, 100);
+ return 0;
+}
+late_initcall(migrate_on_reclaim_init_memhp);
+#endif /* CONFIG_MEMORY_HOTPLUG */
+
+#ifdef CONFIG_HOTPLUG_CPU
+/*
+ * For callers that do not hold get_online_mems() already.
+ */
+static void set_migration_target_nodes(void)
+{
+ get_online_mems();
+ __set_migration_target_nodes();
+ put_online_mems();
+}
+
+/*
+ * React to hotplug events that might affect the migration targets
+ * like events that online or offline NUMA nodes.
+ *
+ * The ordering is also currently dependent on which nodes have
+ * CPUs. That means we need CPU on/offline notification too.
+ */
+static int migration_online_cpu(unsigned int cpu)
+{
+ set_migration_target_nodes();
+ return 0;
+}
+
+static int migration_offline_cpu(unsigned int cpu)
+{
+ set_migration_target_nodes();
+ return 0;
+}
+
+static int __init migrate_on_reclaim_init_cpuhp(void)
{
int ret;
@@ -3299,8 +3309,8 @@ static int __init migrate_on_reclaim_init(void)
*/
WARN_ON(ret < 0);
- hotplug_memory_notifier(migrate_on_reclaim_callback, 100);
return 0;
}
-late_initcall(migrate_on_reclaim_init);
-#endif /* CONFIG_MEMORY_HOTPLUG */
+late_initcall(migrate_on_reclaim_init_cpuhp);
+#endif /* CONFIG_HOTPLUG_CPU */
+#endif /* CONFIG_MEMORY_HOTPLUG || CONFIG_HOTPLUG_CPU */
--
2.25.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: linux-next: Tree for Oct 5 (warnings: a. trace; b. mm/migrate)
2021-10-05 20:46 ` linux-next: Tree for Oct 5 (warnings: a. trace; b. mm/migrate) Randy Dunlap
2021-10-06 14:52 ` Dave Hansen
@ 2021-10-06 21:22 ` Steven Rostedt
2021-10-06 21:32 ` Randy Dunlap
1 sibling, 1 reply; 11+ messages in thread
From: Steven Rostedt @ 2021-10-06 21:22 UTC (permalink / raw)
To: Randy Dunlap
Cc: Stephen Rothwell, Linux Next Mailing List,
Linux Kernel Mailing List, linux-mm, Andrew Morton
On Tue, 5 Oct 2021 13:46:52 -0700
Randy Dunlap <rdunlap@infradead.org> wrote:
> a. randconfig: KCONFIG_SEED=0xBFBEA13C
> ../kernel/trace/trace.c:1712:13: error: 'trace_create_maxlat_file' defined but not used [-Werror=unused-function]
> static void trace_create_maxlat_file(struct trace_array *tr,
Does this fix it?
-- Steve
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 7896d30d90f7..4520cbab0da5 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1744,16 +1744,15 @@ void latency_fsnotify(struct trace_array *tr)
irq_work_queue(&tr->fsnotify_irqwork);
}
-/*
- * (defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER)) && \
- * defined(CONFIG_FSNOTIFY)
- */
-#else
+/* CONFIG_FSNOTIFY else */
+#elif CREATE_MAX_TRACE_FILE
#define trace_create_maxlat_file(tr, d_tracer) \
trace_create_file("tracing_max_latency", 0644, d_tracer, \
&tr->max_latency, &tracing_max_lat_fops)
+#else
+#define trace_create_maxlat_file(tr, d_tracer) do { } while (0)
#endif
#ifdef CONFIG_TRACER_MAX_TRACE
@@ -9473,9 +9472,7 @@ init_tracer_tracefs(struct trace_array *tr, struct dentry *d_tracer)
create_trace_options_dir(tr);
-#if defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER)
trace_create_maxlat_file(tr, d_tracer);
-#endif
if (ftrace_create_function_files(tr, d_tracer))
MEM_FAIL(1, "Could not allocate function filter files");
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index b7c0f8e160fb..680935949aef 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -679,8 +679,11 @@ void update_max_tr_single(struct trace_array *tr,
#endif /* CONFIG_TRACER_MAX_TRACE */
#if (defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER) \
- || defined(CONFIG_OSNOISE_TRACER)) && defined(CONFIG_FSNOTIFY)
-#define LATENCY_FS_NOTIFY
+ || defined(CONFIG_OSNOISE_TRACER))
+# define CREATE_MAX_TRACE_FILE
+# ifdef CONFIG_FSNOTIFY
+# define LATENCY_FS_NOTIFY
+# endif
#endif
#ifdef LATENCY_FS_NOTIFY
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: linux-next: Tree for Oct 5 (warnings: a. trace; b. mm/migrate)
2021-10-06 21:22 ` Steven Rostedt
@ 2021-10-06 21:32 ` Randy Dunlap
2021-10-06 22:06 ` Steven Rostedt
2021-10-07 1:10 ` Steven Rostedt
0 siblings, 2 replies; 11+ messages in thread
From: Randy Dunlap @ 2021-10-06 21:32 UTC (permalink / raw)
To: Steven Rostedt
Cc: Stephen Rothwell, Linux Next Mailing List,
Linux Kernel Mailing List, linux-mm, Andrew Morton
On 10/6/21 2:22 PM, Steven Rostedt wrote:
> On Tue, 5 Oct 2021 13:46:52 -0700
> Randy Dunlap <rdunlap@infradead.org> wrote:
>
>> a. randconfig: KCONFIG_SEED=0xBFBEA13C
>> ../kernel/trace/trace.c:1712:13: error: 'trace_create_maxlat_file' defined but not used [-Werror=unused-function]
>> static void trace_create_maxlat_file(struct trace_array *tr,
>
> Does this fix it?
>
> -- Steve
Yes, thanks.
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
>
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index 7896d30d90f7..4520cbab0da5 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -1744,16 +1744,15 @@ void latency_fsnotify(struct trace_array *tr)
> irq_work_queue(&tr->fsnotify_irqwork);
> }
>
> -/*
> - * (defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER)) && \
> - * defined(CONFIG_FSNOTIFY)
> - */
> -#else
> +/* CONFIG_FSNOTIFY else */
> +#elif CREATE_MAX_TRACE_FILE
>
> #define trace_create_maxlat_file(tr, d_tracer) \
> trace_create_file("tracing_max_latency", 0644, d_tracer, \
> &tr->max_latency, &tracing_max_lat_fops)
>
> +#else
> +#define trace_create_maxlat_file(tr, d_tracer) do { } while (0)
> #endif
>
> #ifdef CONFIG_TRACER_MAX_TRACE
> @@ -9473,9 +9472,7 @@ init_tracer_tracefs(struct trace_array *tr, struct dentry *d_tracer)
>
> create_trace_options_dir(tr);
>
> -#if defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER)
> trace_create_maxlat_file(tr, d_tracer);
> -#endif
>
> if (ftrace_create_function_files(tr, d_tracer))
> MEM_FAIL(1, "Could not allocate function filter files");
> diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
> index b7c0f8e160fb..680935949aef 100644
> --- a/kernel/trace/trace.h
> +++ b/kernel/trace/trace.h
> @@ -679,8 +679,11 @@ void update_max_tr_single(struct trace_array *tr,
> #endif /* CONFIG_TRACER_MAX_TRACE */
>
> #if (defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER) \
> - || defined(CONFIG_OSNOISE_TRACER)) && defined(CONFIG_FSNOTIFY)
> -#define LATENCY_FS_NOTIFY
> + || defined(CONFIG_OSNOISE_TRACER))
> +# define CREATE_MAX_TRACE_FILE
> +# ifdef CONFIG_FSNOTIFY
> +# define LATENCY_FS_NOTIFY
> +# endif
> #endif
>
> #ifdef LATENCY_FS_NOTIFY
>
--
~Randy
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: linux-next: Tree for Oct 5 (warnings: a. trace; b. mm/migrate)
2021-10-06 21:32 ` Randy Dunlap
@ 2021-10-06 22:06 ` Steven Rostedt
2021-10-07 1:10 ` Steven Rostedt
1 sibling, 0 replies; 11+ messages in thread
From: Steven Rostedt @ 2021-10-06 22:06 UTC (permalink / raw)
To: Randy Dunlap
Cc: Stephen Rothwell, Linux Next Mailing List,
Linux Kernel Mailing List, linux-mm, Andrew Morton
On Wed, 6 Oct 2021 14:32:21 -0700
Randy Dunlap <rdunlap@infradead.org> wrote:
> >> a. randconfig: KCONFIG_SEED=0xBFBEA13C
> >> ../kernel/trace/trace.c:1712:13: error: 'trace_create_maxlat_file' defined but not used [-Werror=unused-function]
> >> static void trace_create_maxlat_file(struct trace_array *tr,
> >
> > Does this fix it?
> >
> > -- Steve
>
> Yes, thanks.
>
> Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
>
I believe the proper tags are:
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
-- Steve
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: linux-next: Tree for Oct 5 (warnings: a. trace; b. mm/migrate)
2021-10-06 21:32 ` Randy Dunlap
2021-10-06 22:06 ` Steven Rostedt
@ 2021-10-07 1:10 ` Steven Rostedt
2021-10-07 3:13 ` Randy Dunlap
1 sibling, 1 reply; 11+ messages in thread
From: Steven Rostedt @ 2021-10-07 1:10 UTC (permalink / raw)
To: Randy Dunlap
Cc: Stephen Rothwell, Linux Next Mailing List,
Linux Kernel Mailing List, linux-mm, Andrew Morton, Jackie Liu
On Wed, 6 Oct 2021 14:32:21 -0700
Randy Dunlap <rdunlap@infradead.org> wrote:
> On 10/6/21 2:22 PM, Steven Rostedt wrote:
> > On Tue, 5 Oct 2021 13:46:52 -0700
> > Randy Dunlap <rdunlap@infradead.org> wrote:
> >
> >> a. randconfig: KCONFIG_SEED=0xBFBEA13C
> >> ../kernel/trace/trace.c:1712:13: error: 'trace_create_maxlat_file' defined but not used [-Werror=unused-function]
> >> static void trace_create_maxlat_file(struct trace_array *tr,
> >
> > Does this fix it?
> >
> > -- Steve
>
> Yes, thanks.
>
> Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Plumbers followed by Open Source Summit totally blew my brain cache. I
have a fix for this in my queue from Jackie Liu that I haven't
processed yet (just going through my queue now when I noticed it).
Can you test this patch instead?
https://lore.kernel.org/r/20210922025122.3268022-1-liu.yun@linux.dev
Thanks!
-- Steve
>
>
> >
> > diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> > index 7896d30d90f7..4520cbab0da5 100644
> > --- a/kernel/trace/trace.c
> > +++ b/kernel/trace/trace.c
> > @@ -1744,16 +1744,15 @@ void latency_fsnotify(struct trace_array *tr)
> > irq_work_queue(&tr->fsnotify_irqwork);
> > }
> >
> > -/*
> > - * (defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER)) && \
> > - * defined(CONFIG_FSNOTIFY)
> > - */
> > -#else
> > +/* CONFIG_FSNOTIFY else */
> > +#elif CREATE_MAX_TRACE_FILE
> >
> > #define trace_create_maxlat_file(tr, d_tracer) \
> > trace_create_file("tracing_max_latency", 0644, d_tracer, \
> > &tr->max_latency, &tracing_max_lat_fops)
> >
> > +#else
> > +#define trace_create_maxlat_file(tr, d_tracer) do { } while (0)
> > #endif
> >
> > #ifdef CONFIG_TRACER_MAX_TRACE
> > @@ -9473,9 +9472,7 @@ init_tracer_tracefs(struct trace_array *tr, struct dentry *d_tracer)
> >
> > create_trace_options_dir(tr);
> >
> > -#if defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER)
> > trace_create_maxlat_file(tr, d_tracer);
> > -#endif
> >
> > if (ftrace_create_function_files(tr, d_tracer))
> > MEM_FAIL(1, "Could not allocate function filter files");
> > diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
> > index b7c0f8e160fb..680935949aef 100644
> > --- a/kernel/trace/trace.h
> > +++ b/kernel/trace/trace.h
> > @@ -679,8 +679,11 @@ void update_max_tr_single(struct trace_array *tr,
> > #endif /* CONFIG_TRACER_MAX_TRACE */
> >
> > #if (defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER) \
> > - || defined(CONFIG_OSNOISE_TRACER)) && defined(CONFIG_FSNOTIFY)
> > -#define LATENCY_FS_NOTIFY
> > + || defined(CONFIG_OSNOISE_TRACER))
> > +# define CREATE_MAX_TRACE_FILE
> > +# ifdef CONFIG_FSNOTIFY
> > +# define LATENCY_FS_NOTIFY
> > +# endif
> > #endif
> >
> > #ifdef LATENCY_FS_NOTIFY
> >
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: linux-next: Tree for Oct 5 (warnings: a. trace; b. mm/migrate)
2021-10-07 1:10 ` Steven Rostedt
@ 2021-10-07 3:13 ` Randy Dunlap
0 siblings, 0 replies; 11+ messages in thread
From: Randy Dunlap @ 2021-10-07 3:13 UTC (permalink / raw)
To: Steven Rostedt
Cc: Stephen Rothwell, Linux Next Mailing List,
Linux Kernel Mailing List, linux-mm, Andrew Morton, Jackie Liu
On 10/6/21 6:10 PM, Steven Rostedt wrote:
> On Wed, 6 Oct 2021 14:32:21 -0700
> Randy Dunlap <rdunlap@infradead.org> wrote:
>
>> On 10/6/21 2:22 PM, Steven Rostedt wrote:
>>> On Tue, 5 Oct 2021 13:46:52 -0700
>>> Randy Dunlap <rdunlap@infradead.org> wrote:
>>>
>>>> a. randconfig: KCONFIG_SEED=0xBFBEA13C
>>>> ../kernel/trace/trace.c:1712:13: error: 'trace_create_maxlat_file' defined but not used [-Werror=unused-function]
>>>> static void trace_create_maxlat_file(struct trace_array *tr,
>>>
>>> Does this fix it?
>>>
>>> -- Steve
>>
>> Yes, thanks.
>>
>> Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
>
> Plumbers followed by Open Source Summit totally blew my brain cache. I
> have a fix for this in my queue from Jackie Liu that I haven't
> processed yet (just going through my queue now when I noticed it).
>
> Can you test this patch instead?
>
> https://lore.kernel.org/r/20210922025122.3268022-1-liu.yun@linux.dev
Sure, done. Same good result.
thanks.
--
~Randy
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2021-10-07 3:13 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20211005190628.1f26b13d@canb.auug.org.au>
2021-10-05 20:46 ` linux-next: Tree for Oct 5 (warnings: a. trace; b. mm/migrate) Randy Dunlap
2021-10-06 14:52 ` Dave Hansen
2021-10-06 14:56 ` Steven Rostedt
2021-10-06 16:39 ` Randy Dunlap
2021-10-06 18:16 ` Dave Hansen
2021-10-06 16:33 ` Randy Dunlap
2021-10-06 21:22 ` Steven Rostedt
2021-10-06 21:32 ` Randy Dunlap
2021-10-06 22:06 ` Steven Rostedt
2021-10-07 1:10 ` Steven Rostedt
2021-10-07 3:13 ` Randy Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).