From: Andrew Morton <akpm@osdl.org>
To: Alasdair G Kergon <agk@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 2/5: Device-mapper: kcopyd
Date: Wed, 2 Jun 2004 20:41:26 -0700 [thread overview]
Message-ID: <20040602204126.2bd0565c.akpm@osdl.org> (raw)
In-Reply-To: <20040602154129.GO6302@agk.surrey.redhat.com>
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.
next prev parent reply other threads:[~2004-06-03 3:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-02 15:41 [PATCH] 2/5: Device-mapper: kcopyd Alasdair G Kergon
2004-06-02 16:15 ` Andreas Dilger
2004-06-02 16:50 ` Kevin Corry
2004-07-03 5:44 ` Daniel Phillips
2004-06-02 21:15 ` Alasdair G Kergon
2004-06-03 3:41 ` Andrew Morton [this message]
2004-06-03 13:28 ` Alasdair G Kergon
2004-06-10 6:18 ` Andrew Morton
2004-06-10 8:16 ` Kevin Corry
2004-06-10 18:12 ` Andrew Morton
2004-06-10 14:55 ` Alasdair G Kergon
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=20040602204126.2bd0565c.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=agk@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.