From: Suresh Siddha Subject: Re: [PATCH 6/7] arch/x86: Add array variants for setting memory to wc caching. Date: Thu, 18 Mar 2010 11:29:38 -0800 Message-ID: <1268940578.2794.19.camel@sbs-t61.sc.intel.com> References: <1268859006-18707-1-git-send-email-suokkos@gmail.com> <1268859006-18707-2-git-send-email-suokkos@gmail.com> <1268859006-18707-3-git-send-email-suokkos@gmail.com> <1268859006-18707-4-git-send-email-suokkos@gmail.com> <1268859006-18707-5-git-send-email-suokkos@gmail.com> <1268859006-18707-6-git-send-email-suokkos@gmail.com> <1268859006-18707-7-git-send-email-suokkos@gmail.com> <21d7e9971003171652y1f6c154ah6c821cbbc709cdac@mail.gmail.com> <548cdfc21003180241g35cfc897gd5b7ea2e37a46dd9@mail.gmail.com> Reply-To: Suresh Siddha Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <548cdfc21003180241g35cfc897gd5b7ea2e37a46dd9@mail.gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.sourceforge.net To: Pauli Nieminen Cc: "dri-devel@lists.sourceforge.net" , "Pallipadi, Venkatesh" List-Id: dri-devel@lists.freedesktop.org On Thu, 2010-03-18 at 02:41 -0700, Pauli Nieminen wrote: > On Thu, Mar 18, 2010 at 1:52 AM, Dave Airlie wrote: > > On Thu, Mar 18, 2010 at 6:50 AM, Pauli Nieminen wrote: > >> Setting single memory pages at a time to wc takes a lot time in cache flush. To > >> reduce number of cache flush set_pages_array_wc and set_memory_array_wc can be > >> used to set multiple pages to WC with single cache flush. > > > > I don't think this is correct, I've cc'ed Suresh and Venki who looked > > at this before, > > but I think there is an array in the x86 code that stores the state > > and it only has a > > single bit in it, it needs to be expanded in order to at WC support. > > hmm, I thought we had the array variants for the WC already. I don't think there is any explicit reason for not having it. Correcting Venki's address, to see if he has anything to add. > >> + ret = cpa_set_pages_array(pages, addrinarray, > >> + __pgprot(_PAGE_CACHE_UC_MINUS)); > >> + if (!ret && new_type == _PAGE_CACHE_WC) > >> + ret = change_page_attr_set_clr(NULL, addrinarray, > >> + __pgprot(_PAGE_CACHE_WC), > >> + __pgprot(_PAGE_CACHE_MASK), > >> + 0, CPA_PAGES_ARRAY, pages); Pauli, Is there any reason for not using cpa_set_pages_array() here aswell? thanks, suresh ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev --