use MTRR for write combining if PAT is not available
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=2I 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 dropmtrr_add_unaligned(), all the other parts are still required for reference counting and a propermtrr_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
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()andmtrr_add_page()already check these constraints. Do you want me to check them additionally? Or do you want to completely fail themmap()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 themtrr_add()fails...
Yes, of course.
Jan