Skip to contentSkip to conversation

use MTRR for write combining if PAT is not available

RFC PATCH Thomas Schlichter 2 participants 2 messages Oct 21, 2009

lore
Share & tools
lore
#0 lore raw
Quoted 6 lines · Jan Beulich
Quoted 3 lines

Yes, I had that in the first place, but Jan suggested to extend it to also handle non-aligned, non-power-of-two cases:
http://marc.info/?l=linux-kernel&m=125541951529918&w=2

I merely pointed out it wouldn't work for unaligned addresses or sizes passed in.

Oh, I'm sorry, I must have misinterpreted it...

Quoted 7 lines
Quoted 4 lines

So if it's OK for Jan, I'll reduce the functionality again and use mtrr_add() instead. Btw. this simply means to drop mtrr_add_unaligned(), all the other parts are still required for reference counting and a proper mtrr_del() on file close.

I'm perfectly fine with just handling the aligned case, as long as the code checks that the alignment constraints are met.

Hmm, as far as I see mtrr_add() and mtrr_add_page() already check these constraints. Do you want me to check them additionally? Or do you want to completely fail the mmap() if these constraints are violated?

I'd let mmap() succeed even if the mtrr_add() fails...

Regards,
Thomas

#1 lore raw
Quoted 4 lines
Quoted 1 line
Quoted 1 line

Thomas Schlichter <[email protected]> 21.10.09 16:38 >>>

Hmm, as far as I see mtrr_add() and mtrr_add_page() already check these constraints. Do you want me to check them additionally? Or do you want to completely fail the mmap() if these constraints are violated?

I'd say you should check it explicitly in the caller, to avoid the warning message being printed otherwise.

Quoted 1 line

I'd let mmap() succeed even if the mtrr_add() fails...

Yes, of course.

Jan