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: <1248197676.2368.11.camel@localhost>
Date:	Tue, 21 Jul 2009 19:34:35 +0200
From:	Jerome Glisse <glisse@...edesktop.org>
To:	Thomas Hellström <thomas@...pmail.org>
Cc:	Dave Airlie <airlied@...il.com>, linux-kernel@...r.kernel.org,
	dri-devel@...ts.sf.net
Subject: Re: TTM page pool allocator

On Thu, 2009-06-25 at 17:53 +0200, Thomas Hellström wrote:
> Jerome Glisse skrev:
> > Hi,
> >
> > Thomas i attach a reworked page pool allocator based on Dave works,
> > this one should be ok with ttm cache status tracking. It definitely
> > helps on AGP system, now the bottleneck is in mesa vertex's dma
> > allocation.
> >
> > Cheers,
> > Jerome
> >   
> Hi, Jerome!
> In general it looks very good. Some things that need fixing:
> 
> 1)  We must have a way to hand back pages. I still not quite understand 
> how the shrink callbacks work and whether they are applicable. Another 
> scheme would be to free, say 1MB when we have at least 2MB available.
> 
> 2) We should avoid including AGP headers if AGP is not configured. 
> Either reimplement unmap_page_from_agp or map_page_into_agp or move them 
> out from the AGP headers. We've hade complaints before from people with 
> AGP free systems that the code doesn't compile.
> 
> 3) Since we're allocating (and freeing) in batches we should use the 
> set_pages_array() interface to avoid a global tlb flush per page.
> 
> 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

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ