lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1248204128.2368.20.camel@localhost>
Date:	Tue, 21 Jul 2009 21:22:08 +0200
From:	Jerome Glisse <glisse@...edesktop.org>
To:	Thomas Hellström <thomas@...pmail.org>
Cc:	linux-kernel@...r.kernel.org, dri-devel@...ts.sf.net
Subject: Re: TTM page pool allocator

On Tue, 2009-07-21 at 20:00 +0200, Jerome Glisse wrote:
> On Tue, 2009-07-21 at 19:34 +0200, Jerome Glisse wrote:
> > On Thu, 2009-06-25 at 17:53 +0200, Thomas Hellström wrote:
> > > 
> > > 4) We could now skip the ttm_tt_populate() in ttm_tt_set_caching, since 
> > > it will always allocate cached pages and then transition them.
> > > 
> > 
> > Okay 4) is bad, what happens (my brain is a bit meltdown so i might be
> > wrong) :
> > 1 - bo get allocated tt->state = unpopulated
> > 2 - bo is mapped few page are faulted tt->state = unpopulated
> > 3 - bo is cache transitioned but tt->state == unpopulated but
> >     they are page which have been touch by the cpu so we need
> >     to clflush them and transition them, this never happen if
> >     we don't call ttm_tt_populate and proceed with the remaining
> >     of the cache transitioning functions
> > 
> > As a workaround i will try to go through the pages tables and
> > transition existing pages. Do you have any idea for a better
> > plan ?
> > 
> > Cheers,
> > Jerome
> 
> My workaround ruin the whole idea of pool allocation what happens
> is that most bo get cache transition page per page. My thinking
> is that we should do the following:
> 	- is there is a least one page allocated then fully populate
> 	the object and do cache transition on all the pages.
> 	- otherwise update caching_state and leaves object unpopulated
> 
> This needs that we some how reflect the fact that there is at least
> one page allocated, i am thinking to adding a new state for that :
> ttm_partialy_populated
> 
> Thomas what do you think about that ?
> 
> Cheers,
> Jerome

Attached updated patch it doesn't introduce ttm_partialy_populated
but keep the populate call in cache transition. So far it seems to
work properly on AGP platform and helps quite a lot with performances.
I wonder if i should rather allocate some memory to store the pool
structure in ttm_page_pool_init rather than having quite a lot of
static variables ? Anyone has thought on that ?

Cheers,
Jerome

View attachment "0001-ttm-add-pool-wc-uc-page-allocator.patch" of type "text/x-patch" (16082 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ