Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1618739
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/4] mm: memcontrol: re-use global VM event enum |
| Date | 2017-04-07 14:50 +0200 |
| Message-ID | <ttBuV-78a-7@gated-at.bofh.it> (permalink) |
| References | <tsEOd-2oP-7@gated-at.bofh.it> <tsEOe-2oP-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
I do agree that we should share global and memcg specific events constants
but I am not sure we want to share all of them. Would it make sense to
reorganize the global enum and put those that are shared to the
beginning? We wouldn't need the memcg specific translation then.
Anyway, two comments on the current implementation.
On Tue 04-04-17 18:01:46, Johannes Weiner wrote:
[...]
> +/* Cgroup-specific events, on top of universal VM events */
> +enum memcg_event_item {
> + MEMCG_LOW = NR_VM_EVENT_ITEMS,
> + MEMCG_HIGH,
> + MEMCG_MAX,
> + MEMCG_OOM,
> + MEMCG_NR_EVENTS,
> +};
The above should mention that each supported global VM event should
provide the corresponding translation
[...]
here...
> +/* Universal VM events cgroup1 shows, original sort order */
> +unsigned int memcg1_events[] = {
> + PGPGIN,
> + PGPGOUT,
> + PGFAULT,
> + PGMAJFAULT,
> +};
> +
> +static const char *const memcg1_event_names[] = {
> + "pgpgin",
> + "pgpgout",
> + "pgfault",
> + "pgmajfault",
> +};
the naming doesn't make it easier to undestand why we need this.
global2memcg_event?
--
Michal Hocko
SUSE Labs
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/4] mm: memcontrol: clean up memory.events counting function Johannes Weiner <hannes@cmpxchg.org> - 2017-04-05 00:10 +0200
[PATCH 4/4] mm: memcontrol: use node page state naming scheme for memcg Johannes Weiner <hannes@cmpxchg.org> - 2017-04-05 00:10 +0200
Re: [PATCH 4/4] mm: memcontrol: use node page state naming scheme for memcg Vladimir Davydov <vdavydov.dev@gmail.com> - 2017-04-06 11:10 +0200
Re: [PATCH 4/4] mm: memcontrol: use node page state naming scheme for memcg Michal Hocko <mhocko@kernel.org> - 2017-04-07 15:00 +0200
[PATCH 2/4] mm: memcontrol: re-use global VM event enum Johannes Weiner <hannes@cmpxchg.org> - 2017-04-05 00:10 +0200
Re: [PATCH 2/4] mm: memcontrol: re-use global VM event enum Vladimir Davydov <vdavydov.dev@gmail.com> - 2017-04-06 10:50 +0200
Re: [PATCH 2/4] mm: memcontrol: re-use global VM event enum Johannes Weiner <hannes@cmpxchg.org> - 2017-04-10 16:20 +0200
Re: [PATCH 2/4] mm: memcontrol: re-use global VM event enum Michal Hocko <mhocko@kernel.org> - 2017-04-07 14:50 +0200
Re: [PATCH 2/4] mm: memcontrol: re-use global VM event enum Johannes Weiner <hannes@cmpxchg.org> - 2017-04-10 16:20 +0200
Re: [PATCH 1/4] mm: memcontrol: clean up memory.events counting function Vladimir Davydov <vdavydov.dev@gmail.com> - 2017-04-06 10:40 +0200
Re: [PATCH 1/4] mm: memcontrol: clean up memory.events counting function Michal Hocko <mhocko@kernel.org> - 2017-04-07 14:30 +0200
csiph-web