Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1262513 > unrolled thread
| Started by | James Simmons <jsimmons@infradead.org> |
|---|---|
| First post | 2015-11-04 19:50 +0100 |
| Last post | 2015-11-04 19:50 +0100 |
| Articles | 6 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH 01/10] staging: lustre: wrong parameter to cfs_hash_keycpy James Simmons <jsimmons@infradead.org> - 2015-11-04 19:50 +0100
[PATCH 07/10] staging: lustre: Handle nodemask on UMP machines James Simmons <jsimmons@infradead.org> - 2015-11-04 19:50 +0100
RE: [lustre-devel] [PATCH 07/10] staging: lustre: Handle nodemask on UMP machines "Simmons, James A." <simmonsja@ornl.gov> - 2015-11-06 23:20 +0100
Re: [lustre-devel] [PATCH 07/10] staging: lustre: Handle nodemask on UMP machines Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-11-07 03:50 +0100
Re: [lustre-devel] [PATCH 07/10] staging: lustre: Handle nodemask on UMP machines Dan Carpenter <dan.carpenter@oracle.com> - 2015-11-07 22:00 +0100
[PATCH 09/10] staging: lustre: remove page_collection::pc_lock in libcfs James Simmons <jsimmons@infradead.org> - 2015-11-04 19:50 +0100
| From | James Simmons <jsimmons@infradead.org> |
|---|---|
| Date | 2015-11-04 19:50 +0100 |
| Subject | [PATCH 01/10] staging: lustre: wrong parameter to cfs_hash_keycpy |
| Message-ID | <qrbi9-47z-3@gated-at.bofh.it> |
From: Liang Zhen <liang.zhen@intel.com> cfs_hash_rehash_key() passed wrong parameter to cfs_hash_keycpy, hnode should be the second parameter not the third one. Signed-off-by: Liang Zhen <liang.zhen@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4362 Reviewed-on: http://review.whamcloud.com/8509 Reviewed-by: Bobi Jam <bobijam@gmail.com> Reviewed-by: Johann Lombardi <johann.lombardi@intel.com> --- drivers/staging/lustre/lustre/libcfs/hash.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/lustre/lustre/libcfs/hash.c b/drivers/staging/lustre/lustre/libcfs/hash.c index 98c19b6..8800d64 100644 --- a/drivers/staging/lustre/lustre/libcfs/hash.c +++ b/drivers/staging/lustre/lustre/libcfs/hash.c @@ -2005,7 +2005,7 @@ void cfs_hash_rehash_key(struct cfs_hash *hs, const void *old_key, } /* overwrite key inside locks, otherwise may screw up with * other operations, i.e: rehash */ - cfs_hash_keycpy(hs, new_key, hnode); + cfs_hash_keycpy(hs, hnode, new_key); cfs_hash_multi_bd_unlock(hs, bds, 3, 1); cfs_hash_unlock(hs, 0); -- 1.7.1 -- 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/
[toc] | [next] | [standalone]
| From | James Simmons <jsimmons@infradead.org> |
|---|---|
| Date | 2015-11-04 19:50 +0100 |
| Subject | [PATCH 07/10] staging: lustre: Handle nodemask on UMP machines |
| Message-ID | <qrbia-47z-41@gated-at.bofh.it> |
| In reply to | #1262513 |
For UMP and SMP machines the struct cfs_cpt_table are
defined differently. In the case handled by this patch
nodemask is defined as a integer for the UMP case and
as a pointer for the SMP case. This will cause a problem
for ost_setup which reads the nodemask directly. Instead
we create a UMP version of cfs_cpt_nodemask and use that
in ost_setup.
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4199
Reviewed-on: http://review.whamcloud.com/9219
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Li Xi <pkuelelixi@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
---
drivers/staging/lustre/lustre/libcfs/libcfs_cpu.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/staging/lustre/lustre/libcfs/libcfs_cpu.c b/drivers/staging/lustre/lustre/libcfs/libcfs_cpu.c
index 933525c..de9d289 100644
--- a/drivers/staging/lustre/lustre/libcfs/libcfs_cpu.c
+++ b/drivers/staging/lustre/lustre/libcfs/libcfs_cpu.c
@@ -58,6 +58,7 @@ cfs_cpt_table_alloc(unsigned int ncpt)
LIBCFS_ALLOC(cptab, sizeof(*cptab));
if (cptab != NULL) {
cptab->ctb_version = CFS_CPU_VERSION_MAGIC;
+ set_bit(0, &cptab->ctb_nodemask);
cptab->ctb_nparts = ncpt;
}
@@ -111,6 +112,13 @@ cfs_cpt_online(struct cfs_cpt_table *cptab, int cpt)
}
EXPORT_SYMBOL(cfs_cpt_online);
+nodemask_t *
+cfs_cpt_nodemask(struct cfs_cpt_table *cptab, int cpt)
+{
+ return &cptab->ctb_nodemask;
+}
+EXPORT_SYMBOL(cfs_cpt_cpumask);
+
int
cfs_cpt_set_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu)
{
--
1.7.1
--
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/
[toc] | [prev] | [next] | [standalone]
| From | "Simmons, James A." <simmonsja@ornl.gov> |
|---|---|
| Date | 2015-11-06 23:20 +0100 |
| Subject | RE: [lustre-devel] [PATCH 07/10] staging: lustre: Handle nodemask on UMP machines |
| Message-ID | <qrXwu-25P-7@gated-at.bofh.it> |
| In reply to | #1262515 |
>All warnings (new ones prefixed by >>): > > In file included from include/linux/bitops.h:36:0, > from drivers/staging/lustre/lustre/libcfs/../../include/linux/libcfs/linux/libcfs.h:44, > from drivers/staging/lustre/lustre/libcfs/../../include/linux/libcfs/libcfs.h:40, > from drivers/staging/lustre/lustre/libcfs/libcfs_cpu.c:38: > drivers/staging/lustre/lustre/libcfs/libcfs_cpu.c: In function 'cfs_cpt_table_alloc': >>> arch/m68k/include/asm/bitops.h:64:5: warning: passing argument 2 of 'bset_mem_set_bit' from incompatible pointer type > bset_mem_set_bit(nr, vaddr) : \ > ^ >>> drivers/staging/lustre/lustre/libcfs/libcfs_cpu.c:61:3: note: in expansion of macro 'set_bit' > set_bit(0, &cptab->ctb_nodemask); Yep and additional patch exist to fix this. Should I just push the fix for this or drop this patch and create a new patch that is combo of both fixes. BTW Greg this new batch of patches are order independent. Sorry for not pointing that out. The rest of the patch appear to be okay. -- 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/
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2015-11-07 03:50 +0100 |
| Subject | Re: [lustre-devel] [PATCH 07/10] staging: lustre: Handle nodemask on UMP machines |
| Message-ID | <qs1JL-4zz-3@gated-at.bofh.it> |
| In reply to | #1264602 |
On Fri, Nov 06, 2015 at 10:18:17PM +0000, Simmons, James A. wrote: > >All warnings (new ones prefixed by >>): > > > > In file included from include/linux/bitops.h:36:0, > > from drivers/staging/lustre/lustre/libcfs/../../include/linux/libcfs/linux/libcfs.h:44, > > from drivers/staging/lustre/lustre/libcfs/../../include/linux/libcfs/libcfs.h:40, > > from drivers/staging/lustre/lustre/libcfs/libcfs_cpu.c:38: > > drivers/staging/lustre/lustre/libcfs/libcfs_cpu.c: In function 'cfs_cpt_table_alloc': > >>> arch/m68k/include/asm/bitops.h:64:5: warning: passing argument 2 of 'bset_mem_set_bit' from incompatible pointer type > > bset_mem_set_bit(nr, vaddr) : \ > > ^ > >>> drivers/staging/lustre/lustre/libcfs/libcfs_cpu.c:61:3: note: in expansion of macro 'set_bit' > > set_bit(0, &cptab->ctb_nodemask); > > Yep and additional patch exist to fix this. Should I just push the fix for this or drop this patch and create > a new patch that is combo of both fixes. > > BTW Greg this new batch of patches are order independent. Sorry for not pointing that out. The rest of the > patch appear to be okay. Ok, I'll drop this one, and apply the rest, please resend this after you have fixed it up. thanks, greg k-h -- 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/
[toc] | [prev] | [next] | [standalone]
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Date | 2015-11-07 22:00 +0100 |
| Subject | Re: [lustre-devel] [PATCH 07/10] staging: lustre: Handle nodemask on UMP machines |
| Message-ID | <qsiKC-7dh-11@gated-at.bofh.it> |
| In reply to | #1264602 |
The tree has to be git bisectable. Don't break and then fix, send the combo. regards, dan carpenter -- 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/
[toc] | [prev] | [next] | [standalone]
| From | James Simmons <jsimmons@infradead.org> |
|---|---|
| Date | 2015-11-04 19:50 +0100 |
| Subject | [PATCH 09/10] staging: lustre: remove page_collection::pc_lock in libcfs |
| Message-ID | <qrbib-47z-47@gated-at.bofh.it> |
| In reply to | #1262513 |
From: Liang Zhen <liang.zhen@intel.com>
page_collection::pc_lock is supposed to protect race between
functions called by smp_call_function(), however we don't have
this use-case for ages and page_collection only lives in stack
of thread, so it is safe to remove it.
Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3055
Reviewed-on: http://review.whamcloud.com/7660
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Sebastien Buisson <sebastien.buisson@bull.net>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
---
drivers/staging/lustre/lustre/libcfs/tracefile.c | 14 --------------
drivers/staging/lustre/lustre/libcfs/tracefile.h | 8 --------
2 files changed, 0 insertions(+), 22 deletions(-)
diff --git a/drivers/staging/lustre/lustre/libcfs/tracefile.c b/drivers/staging/lustre/lustre/libcfs/tracefile.c
index 973c7c2..6fe7dfb 100644
--- a/drivers/staging/lustre/lustre/libcfs/tracefile.c
+++ b/drivers/staging/lustre/lustre/libcfs/tracefile.c
@@ -199,7 +199,6 @@ static void cfs_tcd_shrink(struct cfs_trace_cpu_data *tcd)
pgcount + 1, tcd->tcd_cur_pages);
INIT_LIST_HEAD(&pc.pc_pages);
- spin_lock_init(&pc.pc_lock);
list_for_each_entry_safe(tage, tmp, &tcd->tcd_pages, linkage) {
if (pgcount-- == 0)
@@ -522,7 +521,6 @@ static void collect_pages_on_all_cpus(struct page_collection *pc)
struct cfs_trace_cpu_data *tcd;
int i, cpu;
- spin_lock(&pc->pc_lock);
for_each_possible_cpu(cpu) {
cfs_tcd_for_each_type_lock(tcd, i, cpu) {
list_splice_init(&tcd->tcd_pages, &pc->pc_pages);
@@ -534,7 +532,6 @@ static void collect_pages_on_all_cpus(struct page_collection *pc)
}
}
}
- spin_unlock(&pc->pc_lock);
}
static void collect_pages(struct page_collection *pc)
@@ -555,7 +552,6 @@ static void put_pages_back_on_all_cpus(struct page_collection *pc)
struct cfs_trace_page *tmp;
int i, cpu;
- spin_lock(&pc->pc_lock);
for_each_possible_cpu(cpu) {
cfs_tcd_for_each_type_lock(tcd, i, cpu) {
cur_head = tcd->tcd_pages.next;
@@ -573,7 +569,6 @@ static void put_pages_back_on_all_cpus(struct page_collection *pc)
}
}
}
- spin_unlock(&pc->pc_lock);
}
static void put_pages_back(struct page_collection *pc)
@@ -592,7 +587,6 @@ static void put_pages_on_tcd_daemon_list(struct page_collection *pc,
struct cfs_trace_page *tage;
struct cfs_trace_page *tmp;
- spin_lock(&pc->pc_lock);
list_for_each_entry_safe(tage, tmp, &pc->pc_pages, linkage) {
__LASSERT_TAGE_INVARIANT(tage);
@@ -616,7 +610,6 @@ static void put_pages_on_tcd_daemon_list(struct page_collection *pc,
tcd->tcd_cur_daemon_pages--;
}
}
- spin_unlock(&pc->pc_lock);
}
static void put_pages_on_daemon_list(struct page_collection *pc)
@@ -636,8 +629,6 @@ void cfs_trace_debug_print(void)
struct cfs_trace_page *tage;
struct cfs_trace_page *tmp;
- spin_lock_init(&pc.pc_lock);
-
pc.pc_want_daemon_pages = 1;
collect_pages(&pc);
list_for_each_entry_safe(tage, tmp, &pc.pc_pages, linkage) {
@@ -692,7 +683,6 @@ int cfs_tracefile_dump_all_pages(char *filename)
goto out;
}
- spin_lock_init(&pc.pc_lock);
pc.pc_want_daemon_pages = 1;
collect_pages(&pc);
if (list_empty(&pc.pc_pages)) {
@@ -739,8 +729,6 @@ void cfs_trace_flush_pages(void)
struct cfs_trace_page *tage;
struct cfs_trace_page *tmp;
- spin_lock_init(&pc.pc_lock);
-
pc.pc_want_daemon_pages = 1;
collect_pages(&pc);
list_for_each_entry_safe(tage, tmp, &pc.pc_pages, linkage) {
@@ -970,7 +958,6 @@ static int tracefiled(void *arg)
/* we're started late enough that we pick up init's fs context */
/* this is so broken in uml? what on earth is going on? */
- spin_lock_init(&pc.pc_lock);
complete(&tctl->tctl_start);
while (1) {
@@ -1170,7 +1157,6 @@ static void cfs_trace_cleanup(void)
struct page_collection pc;
INIT_LIST_HEAD(&pc.pc_pages);
- spin_lock_init(&pc.pc_lock);
trace_cleanup_on_all_cpus();
diff --git a/drivers/staging/lustre/lustre/libcfs/tracefile.h b/drivers/staging/lustre/lustre/libcfs/tracefile.h
index cb7a396..de37fb7 100644
--- a/drivers/staging/lustre/lustre/libcfs/tracefile.h
+++ b/drivers/staging/lustre/lustre/libcfs/tracefile.h
@@ -196,14 +196,6 @@ extern union cfs_trace_data_union (*cfs_trace_data[TCD_MAX_TYPES])[NR_CPUS];
struct page_collection {
struct list_head pc_pages;
/*
- * spin-lock protecting ->pc_pages. It is taken by smp_call_function()
- * call-back functions. XXX nikita: Which is horrible: all processors
- * receive NMI at the same time only to be serialized by this
- * lock. Probably ->pc_pages should be replaced with an array of
- * NR_CPUS elements accessed locklessly.
- */
- spinlock_t pc_lock;
- /*
* if this flag is set, collect_pages() will spill both
* ->tcd_daemon_pages and ->tcd_pages to the ->pc_pages. Otherwise,
* only ->tcd_pages are spilled.
--
1.7.1
--
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/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web