public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: + kmap-types-clean-up-and-optimization.patch added to -mm tree
       [not found] <201012222248.oBMMmbcF023808@imap1.linux-foundation.org>
@ 2010-12-23  9:58 ` Peter Zijlstra
  2010-12-23 10:47   ` Jan Beulich
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Zijlstra @ 2010-12-23  9:58 UTC (permalink / raw)
  To: akpm; +Cc: mm-commits, JBeulich, hpa, mingo, tglx, LKML

On Wed, 2010-12-22 at 14:48 -0800, akpm@linux-foundation.org wrote:
> The patch titled
>      kmap-types: clean up and optimization
> has been added to the -mm tree.  Its filename is
>      kmap-types-clean-up-and-optimization.patch
> 
> Before you just go and hit "reply", please:
>    a) Consider who else should be cc'ed
>    b) Prefer to cc a suitable mailing list as well
>    c) Ideally: find the original patch on the mailing list and do a
>       reply-to-all to that, adding suitable additional cc's
> 

> ------------------------------------------------------
> Subject: kmap-types: clean up and optimization
> From: "Jan Beulich" <JBeulich@novell.com>
> 
> Several of the types aren't being used at all anymore - those can be
> deleted altogether.  

NO! That's wrong, in fact non of them are being used, but removing them
will decrease the number of kmap_atomic slots, but those are still being
used.

> Others are used only by single components that can be
> assumed to be enabled everywhere, so those are made dependent upon
> CONFIG_* settings.  Since this somewhat conflicts with the sequential gap
> markers used under __WITH_KM_FENCE, and since this can be simplified
> anyway, fold the enumerator definitions with the (modified accordingly)
> KMAP_D() macro always.
> 
> The whole point of the reduction is that, at least on ix86, the number of
> kmap types can (depending on configuration) affect the amount of low
> memory, and thus unused types should be avoided if possible.

Feh, its only a few pages and since there is no way to actually tell if
you've got enough kmap atomic pages other than experiencing runtime
errors, removing them must be done with utmost prudence.

> Signed-off-by: Jan Beulich <jbeulich@novell.com>

Nacked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: + kmap-types-clean-up-and-optimization.patch added to -mm tree
  2010-12-23  9:58 ` + kmap-types-clean-up-and-optimization.patch added to -mm tree Peter Zijlstra
@ 2010-12-23 10:47   ` Jan Beulich
  2010-12-23 10:56     ` Peter Zijlstra
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2010-12-23 10:47 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: mingo, tglx, akpm, LKML, mm-commits, hpa

>>> On 23.12.10 at 10:58, Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> On Wed, 2010-12-22 at 14:48 -0800, akpm@linux-foundation.org wrote:
>> The patch titled
>>      kmap-types: clean up and optimization
>> has been added to the -mm tree.  Its filename is
>>      kmap-types-clean-up-and-optimization.patch
>> 
>> Before you just go and hit "reply", please:
>>    a) Consider who else should be cc'ed
>>    b) Prefer to cc a suitable mailing list as well
>>    c) Ideally: find the original patch on the mailing list and do a
>>       reply-to-all to that, adding suitable additional cc's
>> 
> 
>> ------------------------------------------------------
>> Subject: kmap-types: clean up and optimization
>> From: "Jan Beulich" <JBeulich@novell.com>
>> 
>> Several of the types aren't being used at all anymore - those can be
>> deleted altogether.  
> 
> NO! That's wrong, in fact non of them are being used, but removing them
> will decrease the number of kmap_atomic slots, but those are still being
> used.

Would you mind pointing out examples of such uses (i.e. without
the proper enumerator)? How would those avoid collisions with
actually used slots?

>> Others are used only by single components that can be
>> assumed to be enabled everywhere, so those are made dependent upon
>> CONFIG_* settings.  Since this somewhat conflicts with the sequential gap
>> markers used under __WITH_KM_FENCE, and since this can be simplified
>> anyway, fold the enumerator definitions with the (modified accordingly)
>> KMAP_D() macro always.
>> 
>> The whole point of the reduction is that, at least on ix86, the number of
>> kmap types can (depending on configuration) affect the amount of low
>> memory, and thus unused types should be avoided if possible.
> 
> Feh, its only a few pages and since there is no way to actually tell if
> you've got enough kmap atomic pages other than experiencing runtime
> errors, removing them must be done with utmost prudence.

Whether 2Mb of lowmem is "only a few pages" certainly depends
on the perspective you take.

And even then - shouldn't the bad (non-enumerated) uses of
atomic kmap-s be fixed rather than keeping unused entries in
the enumeration just because there is broken code somewhere?

Jan


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: + kmap-types-clean-up-and-optimization.patch added to -mm tree
  2010-12-23 10:47   ` Jan Beulich
@ 2010-12-23 10:56     ` Peter Zijlstra
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Zijlstra @ 2010-12-23 10:56 UTC (permalink / raw)
  To: Jan Beulich; +Cc: mingo, tglx, akpm, LKML, mm-commits, hpa

On Thu, 2010-12-23 at 10:47 +0000, Jan Beulich wrote:
> >>> On 23.12.10 at 10:58, Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> > On Wed, 2010-12-22 at 14:48 -0800, akpm@linux-foundation.org wrote:
> >> The patch titled
> >>      kmap-types: clean up and optimization
> >> has been added to the -mm tree.  Its filename is
> >>      kmap-types-clean-up-and-optimization.patch
> >> 
> >> Before you just go and hit "reply", please:
> >>    a) Consider who else should be cc'ed
> >>    b) Prefer to cc a suitable mailing list as well
> >>    c) Ideally: find the original patch on the mailing list and do a
> >>       reply-to-all to that, adding suitable additional cc's
> >> 
> > 
> >> ------------------------------------------------------
> >> Subject: kmap-types: clean up and optimization
> >> From: "Jan Beulich" <JBeulich@novell.com>
> >> 
> >> Several of the types aren't being used at all anymore - those can be
> >> deleted altogether.  
> > 
> > NO! That's wrong, in fact non of them are being used, but removing them
> > will decrease the number of kmap_atomic slots, but those are still being
> > used.
> 
> Would you mind pointing out examples of such uses (i.e. without
> the proper enumerator)? How would those avoid collisions with
> actually used slots?

Nobody uses explicit slots anymore:

/*
 * Make both: kmap_atomic(page, idx) and kmap_atomic(page) work.
 */
#define kmap_atomic(page, args...) __kmap_atomic(page)

All instances of KM_foo are deprecated and in need of a cleanup.
See commit: 3e4d3af501cccdc8a8cca41bdbe57d54ad7e7e73

> > Feh, its only a few pages and since there is no way to actually tell if
> > you've got enough kmap atomic pages other than experiencing runtime
> > errors, removing them must be done with utmost prudence.
> 
> Whether 2Mb of lowmem is "only a few pages" certainly depends
> on the perspective you take.
> 
> And even then - shouldn't the bad (non-enumerated) uses of
> atomic kmap-s be fixed rather than keeping unused entries in
> the enumeration just because there is broken code somewhere?

With the current 20 slots on x86, its 80k per CPU, you need 25 CPUs to
cross the 2M boundary, 32bit kernels having that many CPUs deserve to
suffer.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-12-23 10:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <201012222248.oBMMmbcF023808@imap1.linux-foundation.org>
2010-12-23  9:58 ` + kmap-types-clean-up-and-optimization.patch added to -mm tree Peter Zijlstra
2010-12-23 10:47   ` Jan Beulich
2010-12-23 10:56     ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox