Re: [PATCH] x86: trim ram need to check if mtrr is there v3




* Andi Kleen <andi@xxxxxxxxxxxxxx> wrote:

Ingo Molnar <mingo@xxxxxxx> writes:

what we should probably do instead is to have a filter function:

new_end = trim_range_to_mtrr_cached(start, end);

and then we could iterate through every e820 map entry that is
marked as usable RAM, and send it through this filter. If the filter
returns the same value that got passed in, we keep the e820 entry
unchanged. If the filter returns a new "end" value, we use that in
the e820 map.

To be fully generic you would need to allow it to adjust start too.

no, to be fully generic it would have to be able to 'split' e820 entries
up and punch holes into them - but we dont want to go that far i think.
The most common problem is mismatch at the end of a range.

but what matters more is to have full, generic _detection_ of the
problem - and that's what we dont do right now. (and that's what my
reply outlines)

The _fixup_ which we base on this information can then be anything from
"trivially trim the end" up to a complex "punch holes" solution or the
simplest "print nasty warning message and do nothing else" solution.

that way, the current Tom2 hack is just a natural extension to the
filter function: it would (on AMD CPUs) recognize (within
trim_range_to_mtrr_cached filter) that all memory addresses above
4GB are marked as cacheable via Tom2.

Or something like this. Hm?

I agree that would be the correct way to do it.

Later on with PAT that filter could also do PAT related checks and
something like this will likely be needed anyways.

a "what is the effective MTRR caching attribute of this physical
address" type of function would benefit PAT too, yes.

Ingo
--
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/



Relevant Pages

  • Re: DS-CDMA simulation using Matlab
    ... T FILTER FUNCTION ... Rayleigh fading 0:nothing 1:consider ... %CDMA QPSK modulation ich ...
    (comp.soft-sys.matlab)
  • Re: metaclass and customization with parameters
    ... > filter = int ... creating a basic integer-weighted Graph class starting with the ... #A Graph is a dict whose values are Vertex. ... certain type (through the filter function) before insertion into the ...
    (comp.lang.python)
  • Re: Debugging the UnHandledExceptionFilter Function in VS.Net
    ... Unfortunately i'm still unble to debug the filter function either by ... I'm think my filter is registered properly because a printf in the filter ... Using cdb - With a Sleep in filter and attaching to the process after exec ... I do not see the cdb prompt to set a beakpoint or to trace execution! ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Flat Fading in OFDM
    ... Maybe the problem is in gerenating the coefficients for the filter ... filter function I need to ... have channel impluse reponse of the channel. ... I'm not surprised that you are getting a large amount of errors. ...
    (comp.dsp)
  • Re: [PATCH] x86: trim ram need to check if mtrr is there v3
    ... what we should probably do instead is to have a filter function: ... and then we could iterate through every e820 map entry that is marked as ... and send it through this filter. ...
    (Linux-Kernel)

Loading