Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1576535
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH] mm: move pcp and lru-pcp drainging into vmstat_wq |
| Date | 2017-02-08 14:00 +0100 |
| Message-ID | <t8A0P-rN-41@gated-at.bofh.it> (permalink) |
| References | <t8ll7-86g-13@gated-at.bofh.it> <t8ys2-84Y-31@gated-at.bofh.it> <t8zeq-a8-17@gated-at.bofh.it> <t8zR7-oe-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed 08-02-17 12:31:13, Mel Gorman wrote:
> On Wed, Feb 08, 2017 at 01:03:55PM +0100, Michal Hocko wrote:
> > > I don't object to it being actually moved. I have a slight concern that
> > > it could somehow starve a vmstat update while frequent drains happen
> > > during reclaim though which potentially compounds the problem. It could
> > > be offset by a variety of other factors but if it ever is an issue,
> > > it'll show up and the paths that really matter check the vmstats
> > > directly instead of waiting for an update.
> >
> > vmstat updates can tolared delays, that's we we are using deferable
> > scheduling in the first place so I am not really worried about that. Any
> > user which needs a better precision should use *_snapshot API.
> >
>
> Agreed, we already had cases where deferred vmstat updates had problems
> and were resolved by using _snapshot. It's a slight concern only and I'd
> be surprised if the _snapshot usage didn't cover it.
>
> > > The altering of the return value in setup_vmstat was mildly surprising as
> > > it increases the severity of registering the vmstat callback for memory
> > > hotplug so maybe split that out and appears unrelated.
> >
> > not sure I understand. What do you mean?
> >
>
> This hunk
>
> @@ -1763,9 +1762,11 @@ static int vmstat_cpu_dead(unsigned int cpu)
>
> static int __init setup_vmstat(void)
> {
> -#ifdef CONFIG_SMP
> - int ret;
> + int ret = 0;
> +
> + vmstat_wq = alloc_workqueue("vmstat", WQ_FREEZABLE|WQ_MEM_RECLAIM, 0);
>
> +#ifdef CONFIG_SMP
> ret = cpuhp_setup_state_nocalls(CPUHP_MM_VMSTAT_DEAD, "mm/vmstat:dead",
> NULL, vmstat_cpu_dead);
> if (ret < 0)
> @@ -1789,7 +1790,7 @@ static int __init setup_vmstat(void)
> proc_create("vmstat", S_IRUGO, NULL, &proc_vmstat_file_operations);
> proc_create("zoneinfo", S_IRUGO, NULL, &proc_zoneinfo_file_operations);
> #endif
> - return 0;
> + return ret;
>
>
> A failed register of vmstat_cpu_dead is returning the failure code in an
> init function now. Chances are it'll never hit but it didn't seem related
> to the patches general intent.
Ohh, I see now. I will keep the original behavior.
> > > It also feels like vmstat is now a misleading name for something that
> > > handles vmstat, lru drains and per-cpu drains but that's cosmetic.
> >
> > yeah a better name sounds like a good thing. mm_nonblock_wq?
> >
>
> it's not always non-blocking. Maybe mm_percpu_wq to describev a workqueue
> that handles a variety of MM-related per-cpu updates?
Why not, I do not have a strong preference. The WQ is already documented
for its requirements on workers so the name doesn't really have to be
explicit about blocking on allocations.
Thanks!
--
Michal Hocko
SUSE Labs
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[RFC PATCH] mm: move pcp and lru-pcp drainging into vmstat_wq Michal Hocko <mhocko@kernel.org> - 2017-02-07 22:20 +0100
Re: [RFC PATCH] mm: move pcp and lru-pcp drainging into vmstat_wq Vlastimil Babka <vbabka@suse.cz> - 2017-02-08 12:00 +0100
Re: [RFC PATCH] mm: move pcp and lru-pcp drainging into vmstat_wq Michal Hocko <mhocko@kernel.org> - 2017-02-08 13:40 +0100
Re: [RFC PATCH] mm: move pcp and lru-pcp drainging into vmstat_wq Mel Gorman <mgorman@suse.de> - 2017-02-08 12:20 +0100
Re: [RFC PATCH] mm: move pcp and lru-pcp drainging into vmstat_wq Michal Hocko <mhocko@kernel.org> - 2017-02-08 13:10 +0100
Re: [RFC PATCH] mm: move pcp and lru-pcp drainging into vmstat_wq Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2017-02-08 13:50 +0100
Re: [RFC PATCH] mm: move pcp and lru-pcp drainging into vmstat_wq Michal Hocko <mhocko@kernel.org> - 2017-02-08 14:20 +0100
Re: [RFC PATCH] mm: move pcp and lru-pcp drainging into vmstat_wq Mel Gorman <mgorman@suse.de> - 2017-02-08 13:50 +0100
Re: [RFC PATCH] mm: move pcp and lru-pcp drainging into vmstat_wq Michal Hocko <mhocko@kernel.org> - 2017-02-08 14:00 +0100
csiph-web