lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Thu, 24 Mar 2011 14:12:14 +0100
From:	Johannes Weiner <hannes@...xchg.org>
To:	akpm@...ux-foundation.org
Cc:	ak@...ux.intel.com, aarcange@...hat.com,
	kamezawa.hiroyu@...fujitsu.com, mm-commits@...r.kernel.org,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: + mm-add-vm-counters-for-transparent-hugepages.patch added to
 -mm tree

On Fri, Mar 04, 2011 at 04:08:30PM -0800, akpm@...ux-foundation.org wrote:
> diff -puN mm/vmstat.c~mm-add-vm-counters-for-transparent-hugepages mm/vmstat.c
> --- a/mm/vmstat.c~mm-add-vm-counters-for-transparent-hugepages
> +++ a/mm/vmstat.c
> @@ -946,6 +946,14 @@ static const char * const vmstat_text[] 
>  	"unevictable_pgs_stranded",
>  	"unevictable_pgs_mlockfreed",
>  #endif
> +
> +#ifdef CONFIG_TRANSPARENT_HUGEPAGE
> +	"thp_fault_alloc",
> +	"thp_fault_fallback",
> +	"thp_collapse_alloc",
> +	"thp_collapse_alloc_failed",
> +	"thp_split",
> +#endif
>  };

This first #endif in this hunk does not belong to the unevictable
counters, as one could be easily trapped into assuming, it's the
higher level 'vm event counters enabled'.  The thp event name strings
should be part of that block as well.

Since there are no zone stat items after the event counters, the only
misbehaviour for now would be having those strings defined on a THP &&
!VM_EVENT_COUNTERS config.

Signed-off-by: Johannes Weiner <hannes@...xchg.org>
---

diff --git a/mm/vmstat.c b/mm/vmstat.c
index fca991c..5db50e8 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -959,7 +959,6 @@ static const char * const vmstat_text[] = {
 	"unevictable_pgs_cleared",
 	"unevictable_pgs_stranded",
 	"unevictable_pgs_mlockfreed",
-#endif
 
 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
 	"thp_fault_alloc",
@@ -968,6 +967,8 @@ static const char * const vmstat_text[] = {
 	"thp_collapse_alloc_failed",
 	"thp_split",
 #endif
+
+#endif /* CONFIG_VM_EVENTS_COUNTERS */
 };
 
 static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ