From: Andrew Morton <akpm@linux-foundation.org>
To: Dean Nelson <dcn@sgi.com>
Cc: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, tony.luck@intel.com, jes@sgi.com
Subject: Re: [RFC 3/3] SGI Altix cross partition memory (XPMEM)
Date: Fri, 10 Aug 2007 06:15:42 +0000 [thread overview]
Message-ID: <20070809231542.f6dcce8c.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070810011435.GD25427@sgi.com>
On Thu, 9 Aug 2007 20:14:35 -0500 Dean Nelson <dcn@sgi.com> wrote:
> This patch provides cross partition access to user memory (XPMEM) when
> running multiple partitions on a single SGI Altix.
>
- Please don't send multiple patches all with the same title.
- Feed the diff through checkpatch.pl, ponder the result.
- Avoid needless casts to and from void* (eg, vm_private_data)
- The test for PF_DUMPCORE in xpmem_fault_handler() is mysterious and
merits a comment.
- xpmem_fault_handler() is scary.
- xpmem_fault_handler() appears to have imposed a kernel-wide rule that
when taking multiple mmap_sems, one should take the lowest-addressed one
first? If so, that probably wants a mention in that locking comment in
filemap.c
- xpmem_fault_handler() does atomic_dec(&seg_tg->mm->mm_users). What
happens if that was the last reference?
- Has it all been tested with lockdep enabled? Jugding from all the use
of SPIN_LOCK_UNLOCKED, it has not.
Oh, ia64 doesn't implement lockdep. For this code, that is deeply
regrettable.
- This code all predates the nopage->fault conversion and won't work in
current kernels.
- xpmem_attach() does smp_processor_id() in preemptible code. Lucky that
ia64 doesn't do preempt?
- Stuff like this:
+ ap_tg = xpmem_tg_ref_by_apid(apid);
+ if (IS_ERR(ap_tg))
+ return PTR_ERR(ap_tg);
+
+ ap = xpmem_ap_ref_by_apid(ap_tg, apid);
+ if (IS_ERR(ap)) {
+ xpmem_tg_deref(ap_tg);
+ return PTR_ERR(ap);
+ }
is fragile. It is easy to introduce leaks and locking errors as the
code evolves. The code has a lot of these deeply-embedded `return'
statments preceded by duplicated unwinding. Kenrel code generally
prefers to do the `goto out' thing.
- "XPMEM_FLAG_VALIDPTEs"? Someone's pinky got tired at the end ;)
Attention span expired at 19%, sorry. It's a large patch.
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: Dean Nelson <dcn@sgi.com>
Cc: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, tony.luck@intel.com, jes@sgi.com
Subject: Re: [RFC 3/3] SGI Altix cross partition memory (XPMEM)
Date: Thu, 9 Aug 2007 23:15:42 -0700 [thread overview]
Message-ID: <20070809231542.f6dcce8c.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070810011435.GD25427@sgi.com>
On Thu, 9 Aug 2007 20:14:35 -0500 Dean Nelson <dcn@sgi.com> wrote:
> This patch provides cross partition access to user memory (XPMEM) when
> running multiple partitions on a single SGI Altix.
>
- Please don't send multiple patches all with the same title.
- Feed the diff through checkpatch.pl, ponder the result.
- Avoid needless casts to and from void* (eg, vm_private_data)
- The test for PF_DUMPCORE in xpmem_fault_handler() is mysterious and
merits a comment.
- xpmem_fault_handler() is scary.
- xpmem_fault_handler() appears to have imposed a kernel-wide rule that
when taking multiple mmap_sems, one should take the lowest-addressed one
first? If so, that probably wants a mention in that locking comment in
filemap.c
- xpmem_fault_handler() does atomic_dec(&seg_tg->mm->mm_users). What
happens if that was the last reference?
- Has it all been tested with lockdep enabled? Jugding from all the use
of SPIN_LOCK_UNLOCKED, it has not.
Oh, ia64 doesn't implement lockdep. For this code, that is deeply
regrettable.
- This code all predates the nopage->fault conversion and won't work in
current kernels.
- xpmem_attach() does smp_processor_id() in preemptible code. Lucky that
ia64 doesn't do preempt?
- Stuff like this:
+ ap_tg = xpmem_tg_ref_by_apid(apid);
+ if (IS_ERR(ap_tg))
+ return PTR_ERR(ap_tg);
+
+ ap = xpmem_ap_ref_by_apid(ap_tg, apid);
+ if (IS_ERR(ap)) {
+ xpmem_tg_deref(ap_tg);
+ return PTR_ERR(ap);
+ }
is fragile. It is easy to introduce leaks and locking errors as the
code evolves. The code has a lot of these deeply-embedded `return'
statments preceded by duplicated unwinding. Kenrel code generally
prefers to do the `goto out' thing.
- "XPMEM_FLAG_VALIDPTEs"? Someone's pinky got tired at the end ;)
Attention span expired at 19%, sorry. It's a large patch.
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: Dean Nelson <dcn@sgi.com>
Cc: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, tony.luck@intel.com, jes@sgi.com
Subject: Re: [RFC 3/3] SGI Altix cross partition memory (XPMEM)
Date: Thu, 9 Aug 2007 23:15:42 -0700 [thread overview]
Message-ID: <20070809231542.f6dcce8c.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070810011435.GD25427@sgi.com>
On Thu, 9 Aug 2007 20:14:35 -0500 Dean Nelson <dcn@sgi.com> wrote:
> This patch provides cross partition access to user memory (XPMEM) when
> running multiple partitions on a single SGI Altix.
>
- Please don't send multiple patches all with the same title.
- Feed the diff through checkpatch.pl, ponder the result.
- Avoid needless casts to and from void* (eg, vm_private_data)
- The test for PF_DUMPCORE in xpmem_fault_handler() is mysterious and
merits a comment.
- xpmem_fault_handler() is scary.
- xpmem_fault_handler() appears to have imposed a kernel-wide rule that
when taking multiple mmap_sems, one should take the lowest-addressed one
first? If so, that probably wants a mention in that locking comment in
filemap.c
- xpmem_fault_handler() does atomic_dec(&seg_tg->mm->mm_users). What
happens if that was the last reference?
- Has it all been tested with lockdep enabled? Jugding from all the use
of SPIN_LOCK_UNLOCKED, it has not.
Oh, ia64 doesn't implement lockdep. For this code, that is deeply
regrettable.
- This code all predates the nopage->fault conversion and won't work in
current kernels.
- xpmem_attach() does smp_processor_id() in preemptible code. Lucky that
ia64 doesn't do preempt?
- Stuff like this:
+ ap_tg = xpmem_tg_ref_by_apid(apid);
+ if (IS_ERR(ap_tg))
+ return PTR_ERR(ap_tg);
+
+ ap = xpmem_ap_ref_by_apid(ap_tg, apid);
+ if (IS_ERR(ap)) {
+ xpmem_tg_deref(ap_tg);
+ return PTR_ERR(ap);
+ }
is fragile. It is easy to introduce leaks and locking errors as the
code evolves. The code has a lot of these deeply-embedded `return'
statments preceded by duplicated unwinding. Kenrel code generally
prefers to do the `goto out' thing.
- "XPMEM_FLAG_VALIDPTEs"? Someone's pinky got tired at the end ;)
Attention span expired at 19%, sorry. It's a large patch.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2007-08-10 6:15 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-10 1:06 [RFC 0/3] SGI Altix cross partition memory (XPMEM) Dean Nelson
2007-08-10 1:06 ` Dean Nelson
2007-08-10 1:06 ` Dean Nelson
2007-08-10 1:11 ` [RFC 1/3] " Dean Nelson
2007-08-10 1:11 ` Dean Nelson
2007-08-10 1:11 ` Dean Nelson
2007-08-10 1:12 ` [RFC 2/3] " Dean Nelson
2007-08-10 1:12 ` Dean Nelson
2007-08-10 1:12 ` Dean Nelson
2007-08-10 1:14 ` [RFC 3/3] " Dean Nelson
2007-08-10 1:14 ` Dean Nelson
2007-08-10 6:15 ` Andrew Morton [this message]
2007-08-10 6:15 ` Andrew Morton
2007-08-10 6:15 ` Andrew Morton
2007-08-22 17:00 ` Dean Nelson
2007-08-22 17:00 ` Dean Nelson
2007-08-22 18:04 ` Andrew Morton
2007-08-22 18:04 ` Andrew Morton
2007-08-22 18:04 ` Andrew Morton
2007-08-22 19:15 ` Dean Nelson
2007-08-22 19:15 ` Dean Nelson
2007-08-22 19:15 ` Dean Nelson
2007-08-22 19:49 ` Andrew Morton
2007-08-22 19:49 ` Andrew Morton
2007-08-22 19:49 ` Andrew Morton
2007-08-23 13:58 ` Andy Whitcroft
2007-08-23 13:58 ` Andy Whitcroft
2007-08-23 13:58 ` Andy Whitcroft
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=20070809231542.f6dcce8c.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dcn@sgi.com \
--cc=jes@sgi.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=tony.luck@intel.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 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.