From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: j.glisse@gmail.com
Cc: thellstrom@vmware.com, Jerome Glisse <jglisse@redhat.com>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 5/8] drm/ttm: convert page allocation to use page ptr array instead of list V2
Date: Thu, 3 Nov 2011 14:45:11 -0400 [thread overview]
Message-ID: <20111103184511.GB521@phenom.dumpdata.com> (raw)
In-Reply-To: <1320277075-19980-6-git-send-email-j.glisse@gmail.com>
On Wed, Nov 02, 2011 at 07:37:52PM -0400, j.glisse@gmail.com wrote:
> From: Jerome Glisse <jglisse@redhat.com>
>
> Use the ttm_tt page ptr array for page allocation, move the list to
> array unwinding into the page allocation functions.
>
> V2 split the fix to use ttm put page as a separate fix
> properly fill pages array when TTM_PAGE_FLAG_ZERO_ALLOC is not
> set
>
> Signed-off-by: Jerome Glisse <jglisse@redhat.com>
.. snip..
> static void ttm_tt_free_alloced_pages(struct ttm_tt *ttm)
> {
> - int i;
> - unsigned count = 0;
> - struct list_head h;
> - struct page *cur_page;
> struct ttm_backend *be = ttm->be;
> -
> - INIT_LIST_HEAD(&h);
> + struct ttm_mem_global *glob = ttm->glob->mem_glob;
>
> if (be)
> be->func->clear(be);
> - for (i = 0; i < ttm->num_pages; ++i) {
>
> - cur_page = ttm->pages[i];
> - ttm->pages[i] = NULL;
> - if (cur_page) {
> - if (page_count(cur_page) != 1)
We don't want to keep that check? Or perhaps move that
functionality into ttm_put_pages?
> - printk(KERN_ERR TTM_PFX
> - "Erroneous page count. "
> - "Leaking pages.\n");
> - ttm_mem_global_free_page(ttm->glob->mem_glob,
> - cur_page);
> - list_add(&cur_page->lru, &h);
> - count++;
> - }
> - }
> - ttm_put_pages(&h, count, ttm->page_flags, ttm->caching_state,
> - ttm->dma_address);
> + ttm_mem_global_free_pages(glob, ttm->pages, ttm->num_pages);
> + ttm_put_pages(ttm->pages, ttm->num_pages, ttm->page_flags,
> + ttm->caching_state, ttm->dma_address);
> ttm->state = tt_unpopulated;
> }
Otherwise Reviewd-by...
next prev parent reply other threads:[~2011-11-03 18:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-02 23:37 [RFC] ttm merge ttm_backend & ttm_t V2 j.glisse
2011-11-02 23:37 ` [PATCH 1/8] drm/ttm: remove userspace backed ttm object support j.glisse
2011-11-02 23:37 ` [PATCH 2/8] drm/ttm: remove split btw highmen and lowmem page j.glisse
2011-11-02 23:37 ` [PATCH 3/8] drm/ttm: remove unused backend flags field j.glisse
2011-11-02 23:37 ` [PATCH 4/8] drm/ttm: use ttm put pages function to properly restore cache attribute j.glisse
2011-11-03 18:35 ` Konrad Rzeszutek Wilk
2011-11-02 23:37 ` [PATCH 5/8] drm/ttm: convert page allocation to use page ptr array instead of list V2 j.glisse
2011-11-03 18:45 ` Konrad Rzeszutek Wilk [this message]
2011-11-02 23:37 ` [PATCH 6/8] drm/ttm: test for dma_address array allocation failure j.glisse
2011-11-03 18:45 ` Konrad Rzeszutek Wilk
2011-11-02 23:37 ` [PATCH 7/8] drm/ttm: merge ttm_backend and ttm_tt j.glisse
2011-11-02 23:37 ` [PATCH 8/8] drm/ttm: introduce callback for ttm_tt populate & unpopulate j.glisse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111103184511.GB521@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=j.glisse@gmail.com \
--cc=jglisse@redhat.com \
--cc=thellstrom@vmware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox