[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47F098E8.1050605@tungstengraphics.com>
Date: Mon, 31 Mar 2008 09:55:20 +0200
From: Thomas Hellström <thomas@...gstengraphics.com>
To: Andi Kleen <andi@...stfloor.org>
CC: Dave Airlie <airlied@...hat.com>, linux-kernel@...r.kernel.org,
tglx@...utronix.de, mingo@...hat.com, arjan@...ux.intel.com
Subject: Re: [PATCH] x86: create array based interface to change page attribute
Andi Kleen wrote:
> Dave Airlie <airlied@...hat.com> writes:
>
>>
>> +#define CPA_FLUSHTLB 1
>> +#define CPA_ARRAY 2
>>
>
> I don't think CPA_ARRAY should be a separate case. Rather single
> page flushing should be an array with only a single entry. pageattr
> is already very complex, no need to make add more special cases.
>
>> +
>> + /*
>> + * Only flush present addresses:
>> + */
>> + if (pte && (pte_val(*pte) & _PAGE_PRESENT))
>> + clflush_cache_range((void *) *addr, PAGE_SIZE);
>>
>
> Also it is doubtful clflush really makes sense on a large array. Just
> doing wbinvd might be faster then. Or perhaps better supporting Self-Snoop
> should be revisited, that would at least eliminate it on most Intel
> CPUs.
>
>
I agree that wbinvd() seems to be faster on large arrays on the
processors I've tested. But isn't there a severe latency problem with
that instruction, that makes people really want to avoid it in all
possible cases?
Also I think we need to clarify the semantics of the c_p_a
functionality. Right now both AGP and DRM relies on c_p_a doing an
explicit cache flush. Otherwise the data won't appear on the device side
of the aperture.
If we use self-snoop, the AGP and DRM drivers can't rely on this flush
being performed, and they have to do the flush themselves, and for
non-self-snooping processors, the flush needs to be done twice?
/Thomas
> -Andi
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists