From: Christoph Hellwig <hch@infradead.org>
To: David Howells <dhowells@redhat.com>
Cc: torvalds@transmeta.com, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org, openafs-devel@openafs.org
Subject: Re: [PATCH] PAG support, try #2
Date: Wed, 14 May 2003 11:56:53 +0100 [thread overview]
Message-ID: <20030514115653.A15202@infradead.org> (raw)
In-Reply-To: <24225.1052909011@warthog.warthog>; from dhowells@redhat.com on Wed, May 14, 2003 at 11:43:31AM +0100
On Wed, May 14, 2003 at 11:43:31AM +0100, David Howells wrote:
> +extern long sys_setpag(pag_t);
> +extern long sys_getpag(void);
These have to be a marked asmlinkage. What's the reason you have
the syscall in this header anyway?
> +static kmem_cache_t *vfs_token_cache;
> +static kmem_cache_t *vfs_pag_cache;
So do you have an estimate for the number of users here yet?
Adding two more slab caches that are unused for 99% of the users
might not be the best choice if there's no strong need.
> +inline pag_t vfs_leave_pag(void)
Inline but not static seems strange..
> +/*
> + * join an existing PAG (+ve), run without PAG (0), or create and join new PAG (-1)
> + * - PAG IDs must be +ve, >0 and unique
> + * - returns ID of PAG joined or 0 if now running without a PAG
> + */
> +long sys_setpag(pag_t pag)
> +{
> + if (pag > 0) return vfs_join_pag(pag);
> + else if (pag == 0) return vfs_leave_pag();
> + else if (pag == -1) return vfs_new_pag();
> + else return -EINVAL;
> +}
We already discussed the coding style issue, but anyway, why aren't
these three separate syscalls?
> +void vfs_pag_put(struct vfs_pag *vfspag)
> +{
> + struct vfs_token *vtoken;
> +
> + if (vfspag && atomic_dec_and_lock(&vfspag->usage, &vfs_pag_lock)) {
> + rb_erase(&vfspag->node, &vfs_pag_tree);
> + spin_unlock(&vfs_pag_lock);
> +
> + while (!list_empty(&vfspag->tokens)) {
What protects vfspag->tokens?
> +/*
> + * search for a token covering a particular filesystem key in the specified pag list
> + */
Please linwrap after 80 chars.
> +
> + if (p->vfspag)
> + vfs_pag_get(p->vfspag);
> +
Shouldn't vfs_pag_get hanlde a NULL argument instead?
> diff -uNr linux-2.5.69/kernel/Makefile linux-2.5.69-pag/kernel/Makefile
> --- linux-2.5.69/kernel/Makefile 2003-05-06 15:04:56.000000000 +0100
> +++ linux-2.5.69-pag/kernel/Makefile 2003-05-13 10:45:27.000000000 +0100
> @@ -3,7 +3,7 @@
> #
>
> obj-y = sched.o fork.o exec_domain.o panic.o printk.o profile.o \
> - exit.o itimer.o time.o softirq.o resource.o \
> + cred.o exit.o itimer.o time.o softirq.o resource.o \
What happened to the suggestion to make the pag code optional? It's
really easy to stub it out properly and most people don't need it.
next prev parent reply other threads:[~2003-05-14 10:44 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-14 10:43 [PATCH] PAG support, try #2 David Howells
2003-05-14 10:56 ` Christoph Hellwig [this message]
2003-05-14 11:56 ` David Howells
2003-05-14 12:35 ` Christoph Hellwig
2003-05-14 12:45 ` William Lee Irwin III
2003-05-14 12:57 ` Jeff Garzik
2003-05-14 11:49 ` Matthew Wilcox
2003-05-14 12:03 ` David Howells
2003-05-14 16:49 ` Linus Torvalds
2003-05-14 17:37 ` David Howells
2003-05-15 11:18 ` Ingo Oeser
2003-05-18 14:51 ` Trond Myklebust
2003-05-14 16:58 ` Jan Harkes
2003-05-14 17:11 ` Jan Harkes
2003-05-14 20:45 ` [OpenAFS-devel] " Harald Barth
2003-05-15 0:14 ` Garance A Drosihn
2003-05-15 0:57 ` [OpenAFS-devel] " Linus Torvalds
2003-05-15 1:34 ` Trond Myklebust
2003-05-15 2:30 ` Linus Torvalds
2003-05-15 14:04 ` Dean Anderson
2003-05-15 16:20 ` Linus Torvalds
2003-05-15 16:41 ` David Howells
2003-05-15 17:23 ` Linus Torvalds
2003-05-16 12:12 ` David Howells
2003-05-15 23:00 ` Garance A Drosihn
2003-05-16 0:53 ` [OpenAFS-devel] " Nathan Neulinger
2003-05-15 4:26 ` Russ Allbery
2003-05-15 4:59 ` [OpenAFS-devel] " Linus Torvalds
2003-05-15 15:34 ` Booker Bense
2003-05-15 6:04 ` Riley Williams
2003-05-15 13:26 ` Garance A Drosihn
2003-05-15 13:12 ` Garance A Drosihn
2003-05-15 15:55 ` Douglas E. Engert
2003-05-15 13:35 ` [OpenAFS-devel] " David Howells
2003-05-15 13:55 ` chas williams
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=20030514115653.A15202@infradead.org \
--to=hch@infradead.org \
--cc=dhowells@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=openafs-devel@openafs.org \
--cc=torvalds@transmeta.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