Re: [RFC 01/22] Generic show_mem() implementation

From: Johannes Weiner
Date: Fri Apr 04 2008 - 19:10:59 EST


Hi Sam,

Sam Ravnborg <sam@xxxxxxxxxxxx> writes:

>> >> After more thinking about it, wouldn't it be better to have
>> >> HAVE_ARCH_SHOW_MEM in mm/Kconfig and let archs with their own show_mem()
>> >> select it? Because there are far more archs that use the generic
>> >> version than those having their own.
>> >
>> > Positive logic is almost always simpler to grasp.
>> > And the usual way to do this is to let arch's select what they
>> > use.
>> > We do not want to have a situation where in most cases we select
>> > a generic version but in some oddball case we select to have
>> > a local version.
>>
>> I can not follow you. Of course the arch selects what they use. But
>> they should not _all_ have to be flagged with an extra select. So what
>> default-value are you arguing for?
> The normal pattern is to let arch select the generic implmentation they
> use.
> Just because the majority does use the generic version should not
> make us start to use the inverse logic as in your case.
>
> So I want all archs that uses the generic show_mem() to
> do an explicit:
>
> config MYARCH
> select HAVE_GENERIC_SHOWMEM
>
> Sam

What is the rationale behind this? It is not a function the arch should
select at all because it is VM code. The remaining arch-specific
versions are meant to be removed too.

It would be like forcing all architectures to select HAVE_GENERIC_PRINTK
just because one architecture oopses on printk() and needs to replace it
with its own version.

Hannes
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/