lkml.org 
[lkml]   [2004]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] 2/5: Device-mapper: kcopyd
Alasdair G Kergon <agk@redhat.com> wrote:
>
> kcopyd

I dunno about the rest of the people around here but I for one do not know
what kcopyd does, nor why it is being added to the kernel. The changelog
was your chance to enlighten us - it is a shame nobody took the five
minutes to prepare a description.


> +static void drop_pages(struct page_list *pl)
> +{
> + struct page_list *next;
> +
> + while (pl) {
> + next = pl->next;
> + free_pl(pl);
> + pl = next;
> + }
> +}

What is the page pool for? It is unfortunate that there is no suitable
library code for managing this - it is a fairly common pattern. Maybe we
could massage mempools in some manner.

Why are the pooled pages locked?

> +static LIST_HEAD(_complete_jobs);
> +static LIST_HEAD(_io_jobs);
> +static LIST_HEAD(_pages_jobs);
> +
> +static int __init jobs_init(void)
> +{
> + INIT_LIST_HEAD(&_complete_jobs);
> + INIT_LIST_HEAD(&_io_jobs);
> + INIT_LIST_HEAD(&_pages_jobs);

Do these lists need to be initialised a second time?

> + memcpy(sub_job, job, sizeof(*job));
> + memcpy(&job->source, from, sizeof(*from));

Structure assignments are nice. If the struct is small the compiler will
do an element-by-element copy. At some compiler-determined breakpoint it
will do a memcpy. And it's typesafe.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [from the cache]
©2003-2011 Jasper Spaans