On Mon, 14 Mar 2005, Andrew Morton wrote:

> I don't think the MM_COUNTER_T macro adds much, really.  How about this?

Then you wont be able to get rid of the counters by

#define MM_COUNTER(xx)

anymore.

>
> --- 25/include/linux/sched.h~mm-counter-operations-through-macros-tidy        
> 2005-03-14 21:43:00.000000000 -0800
> +++ 25-akpm/include/linux/sched.h     2005-03-14 21:43:00.000000000 -0800
> @@ -210,7 +210,6 @@ extern void arch_unmap_area_topdown(stru
>  #define inc_mm_counter(mm, member) (mm)->_##member++
>  #define dec_mm_counter(mm, member) (mm)->_##member--
>  typedef unsigned long mm_counter_t;
> -#define MM_COUNTER_T(member) mm_counter_t _##member
>
>  struct mm_struct {
>       struct vm_area_struct * mmap;           /* list of VMAs */
> @@ -241,8 +240,8 @@ struct mm_struct {
>       unsigned long exec_vm, stack_vm, reserved_vm, def_flags, nr_ptes;
>
>       /* Special counters protected by the page_table_lock */
> -     MM_COUNTER_T(rss);
> -     MM_COUNTER_T(anon_rss);
> +     mm_counter_t _rss;
> +     mm_counter_t _anon_rss;
>
>       unsigned long saved_auxv[42]; /* for /proc/PID/auxv */
>
> _
>
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to