linux.kernel - 26 new messages in 16 topics - digest
linux.kernel
http://groups.google.com/group/linux.kernel?hl=en
linux.kernel@googlegroups.com
Today's topics:
* ixgbe: set driver_max_VFs should be done before enabling SRIOV - 1 messages,
1 author
http://groups.google.com/group/linux.kernel/t/af1c0ffae879398a?hl=en
* ixgbe: define IXGBE_MAX_VFS_DRV_LIMIT macro and cleanup const 63 - 1
messages, 1 author
http://groups.google.com/group/linux.kernel/t/c31556ee87d49506?hl=en
* mtd: nand: remove pasemi_nand driver - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/1b9896d53051a4b4?hl=en
* f2fs: handle errors correctly during f2fs_reserve_block - 1 messages, 1
author
http://groups.google.com/group/linux.kernel/t/36ddf208d3833e7f?hl=en
* f2fs: fix build warning for f2fs_has_inline_data() - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/9277437d2e9a5bac?hl=en
* cpufreq: Fix timer/workqueue corruption by protecting reading governor_
enabled - 2 messages, 2 authors
http://groups.google.com/group/linux.kernel/t/1e2d65b016fd7b58?hl=en
* net: igbvf: slight optimization of addr compare - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/6552e236459e977b?hl=en
* ARM: omapfb: Add early framebuffer memory allocator - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/27241acfc4476030?hl=en
* mm/slub: fix accumulate per cpu partial cache objects - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/0cb324ae47631dd0?hl=en
* net: ixgbe: slight optimization of addr compare - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/83939ed7941c486a?hl=en
* Staging: tidspbridge: Use hashtable implementation - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/eef76bdd56cd4229?hl=en
* Add the LED burst trigger - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/62d67318b99b0ab1?hl=en
* cpufreq: try to resume policies which failed on last resume - 2 messages, 1
author
http://groups.google.com/group/linux.kernel/t/a84d5003d1ec65b6?hl=en
* perf tools: Make the print_pmu_events funtion to return unsigned int. - 9
messages, 1 author
http://groups.google.com/group/linux.kernel/t/003bb3b209f00698?hl=en
* serial: samsung: Remove hard-coded major/minor numbers - 1 messages, 1
author
http://groups.google.com/group/linux.kernel/t/84254284a552fbb4?hl=en
* nouveau nvaa clock missing break? - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/e4e1f1e1869b3f36?hl=en
==============================================================================
TOPIC: ixgbe: set driver_max_VFs should be done before enabling SRIOV
http://groups.google.com/group/linux.kernel/t/af1c0ffae879398a?hl=en
==============================================================================
== 1 of 1 ==
Date: Fri, Dec 27 2013 1:10 am
From: Jeff Kirsher
On Wed, 2013-12-25 at 00:07 +0800, Ethan Zhao wrote:
> commit 43dc4e01 Limit number of reported VFs to device specific value
> It doesn't work and always returns -EBUSY because VFs ware already
> enabled.
>
> ixgbe_enable_sriov()
> pci_enable_sriov()
> sriov_enable()
> {
> ... ..
> iov->ctrl |= PCI_SRIOV_CTRL_VFE | PCI_SRIOV_CTRL_MSE;
> pci_cfg_access_lock(dev);
> ... ...
> }
>
> pci_sriov_set_totalvfs()
> {
> ... ...
> if (dev->sriov->ctrl & PCI_SRIOV_CTRL_VFE)
> return -EBUSY;
> ...
> }
>
> So should set driver_max_VFs with pci_sriov_set_totalvfs() before
> enable VFs with ixgbe_enable_sriov().
>
> Signed-off-by: Ethan Zhao <ethan.kernel@gmail.com>
> ---
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks Ethan, I have added this patch as well to my queue.
==============================================================================
TOPIC: ixgbe: define IXGBE_MAX_VFS_DRV_LIMIT macro and cleanup const 63
http://groups.google.com/group/linux.kernel/t/c31556ee87d49506?hl=en
==============================================================================
== 1 of 1 ==
Date: Fri, Dec 27 2013 1:10 am
From: Jeff Kirsher
On Wed, 2013-12-25 at 00:12 +0800, Ethan Zhao wrote:
> Because ixgbe driver limit the max number of VF functions could be
> enabled
> to 63, so define one macro IXGBE_MAX_VFS_DRV_LIMIT and cleanup the
> const 63
> in code.
>
> v2: fix a typo.
>
> Signed-off-by: Ethan Zhao <ethan.kernel@gmail.com>
> ---
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 ++--
> drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 5 +++--
> drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h | 5 +++++
> 3 files changed, 10 insertions(+), 4 deletions(-)
Added to my queue, thanks Ethan!
==============================================================================
TOPIC: mtd: nand: remove pasemi_nand driver
http://groups.google.com/group/linux.kernel/t/1b9896d53051a4b4?hl=en
==============================================================================
== 1 of 1 ==
Date: Fri, Dec 27 2013 1:20 am
From: Paul Bolle
On Thu, 2013-12-26 at 21:52 -0800, Olof Johansson wrote:
> The PA Semi platform is sparsely used these days (with just a handful
> of known users out there). I'm 100% sure none of them use the MTD NAND
> driver -- most standard use cases include PCI-e SATA controllers for
> storage instead, and boot is done from LPC NOR flash.
>
> So, there's little reason to keep carrying a driver that's not used by
> anybody and that just gets hit by some tree-wide or tools-based changes
> every now and then.
>
> Signed-off-by: Olof Johansson <olof@lixom.net>
> ---
> drivers/mtd/nand/pasemi_nand.c | 238 ----------------------------------------
> 1 file changed, 238 deletions(-)
> delete mode 100644 drivers/mtd/nand/pasemi_nand.c
If this gets accepted we should remove the related entry in
drivers/mtd/nand/Kconfig and the related line in
drivers/mtd/nand/Makefile too, shouldn't we?
Paul Bolle
--
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/
==============================================================================
TOPIC: f2fs: handle errors correctly during f2fs_reserve_block
http://groups.google.com/group/linux.kernel/t/36ddf208d3833e7f?hl=en
==============================================================================
== 1 of 1 ==
Date: Fri, Dec 27 2013 1:20 am
From: Jaegeuk Kim
The get_dnode_of_data nullifies inode and node page when error is occurred.
There are two cases that passes inode page into get_dnode_of_data().
1. make_empty_dir()
-> get_new_data_page()
-> f2fs_reserve_block(ipage)
-> get_dnode_of_data()
2. f2fs_convert_inline_data()
-> __f2fs_convert_inline_data()
-> f2fs_reserve_block(ipage)
-> get_dnode_of_data()
This patch adds correct error handling codes when get_dnode_of_data() returns
an error.
At first, f2fs_reserve_block() calls f2fs_put_dnode() whenever reserve_new_block
returns an error.
So, the rule of f2fs_reserve_block() is to nullify inode page when there is any
error internally.
Finally, two callers of f2fs_reserve_block() should call f2fs_put_dnode()
appropriately if they got an error since successful f2fs_reserve_block().
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
---
fs/f2fs/data.c | 29 ++++++++++++++++++++---------
fs/f2fs/dir.c | 7 ++++---
fs/f2fs/inline.c | 6 ++----
3 files changed, 26 insertions(+), 16 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index fc7a28c..63d1902 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -258,13 +258,16 @@ int f2fs_reserve_block(struct dnode_of_data *dn, pgoff_t index)
bool need_put = dn->inode_page ? false : true;
int err;
+ /* if inode_page exists, index should be zero */
+ f2fs_bug_on(!need_put && index);
+
err = get_dnode_of_data(dn, index, ALLOC_NODE);
if (err)
return err;
+
if (dn->data_blkaddr == NULL_ADDR)
err = reserve_new_block(dn);
-
- if (need_put)
+ if (err || need_put)
f2fs_put_dnode(dn);
return err;
}
@@ -510,10 +513,10 @@ repeat:
*
* Also, caller should grab and release a rwsem by calling f2fs_lock_op() and
* f2fs_unlock_op().
- * Note that, npage is set only by make_empty_dir.
+ * Note that, ipage is set only by make_empty_dir.
*/
struct page *get_new_data_page(struct inode *inode,
- struct page *npage, pgoff_t index, bool new_i_size)
+ struct page *ipage, pgoff_t index, bool new_i_size)
{
struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb);
struct address_space *mapping = inode->i_mapping;
@@ -521,14 +524,16 @@ struct page *get_new_data_page(struct inode *inode,
struct dnode_of_data dn;
int err;
- set_new_dnode(&dn, inode, npage, npage, 0);
+ set_new_dnode(&dn, inode, ipage, NULL, 0);
err = f2fs_reserve_block(&dn, index);
if (err)
return ERR_PTR(err);
repeat:
page = grab_cache_page(mapping, index);
- if (!page)
- return ERR_PTR(-ENOMEM);
+ if (!page) {
+ err = -ENOMEM;
+ goto put_err;
+ }
if (PageUptodate(page))
return page;
@@ -540,11 +545,13 @@ repeat:
err = f2fs_submit_page_bio(sbi, page, dn.data_blkaddr,
READ_SYNC);
if (err)
- return ERR_PTR(err);
+ goto put_err;
+
lock_page(page);
if (unlikely(!PageUptodate(page))) {
f2fs_put_page(page, 1);
- return ERR_PTR(-EIO);
+ err = -EIO;
+ goto put_err;
}
if (unlikely(page->mapping != mapping)) {
f2fs_put_page(page, 1);
@@ -560,6 +567,10 @@ repeat:
mark_inode_dirty_sync(inode);
}
return page;
+
+put_err:
+ f2fs_put_dnode(&dn);
+ return ERR_PTR(err);
}
static int __allocate_data_block(struct dnode_of_data *dn)
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index 6da77e5..f815ca0 100644
--- a/fs/f2fs/dir.c
+++ b/fs/f2fs/dir.c
@@ -342,11 +342,11 @@ static struct page *init_inode_metadata(struct inode *inode,
err = f2fs_init_acl(inode, dir, page);
if (err)
- goto error;
+ goto put_error;
err = f2fs_init_security(inode, dir, name, page);
if (err)
- goto error;
+ goto put_error;
wait_on_page_writeback(page);
} else {
@@ -370,8 +370,9 @@ static struct page *init_inode_metadata(struct inode *inode,
}
return page;
-error:
+put_error:
f2fs_put_page(page, 1);
+error:
remove_inode_page(inode);
return ERR_PTR(err);
}
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
index bcc6f65..afbdf87 100644
--- a/fs/f2fs/inline.c
+++ b/fs/f2fs/inline.c
@@ -81,10 +81,9 @@ static int __f2fs_convert_inline_data(struct inode *inode, struct page *page)
* i_addr[0] is not used for inline data,
* so reserving new block will not destroy inline data
*/
- set_new_dnode(&dn, inode, ipage, ipage, 0);
+ set_new_dnode(&dn, inode, ipage, NULL, 0);
err = f2fs_reserve_block(&dn, 0);
if (err) {
- f2fs_put_page(ipage, 1);
f2fs_unlock_op(sbi);
return err;
}
@@ -111,9 +110,8 @@ static int __f2fs_convert_inline_data(struct inode *inode, struct page *page)
stat_dec_inline_inode(inode);
sync_inode_page(&dn);
- f2fs_put_page(ipage, 1);
+ f2fs_put_dnode(&dn);
f2fs_unlock_op(sbi);
-
return err;
}
--
1.8.4.474.g128a96c
--
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/
==============================================================================
TOPIC: f2fs: fix build warning for f2fs_has_inline_data()
http://groups.google.com/group/linux.kernel/t/9277437d2e9a5bac?hl=en
==============================================================================
== 1 of 1 ==
Date: Fri, Dec 27 2013 1:30 am
From: Jaegeuk Kim
Hi,
Could you refer the following patch that I sent?
Re: [PATCH 5/6] f2fs: add the number of inline_data files to status info
Thanks,
2013-12-27 (금), 14:45 +0800, Haicheng Li:
> This patch is to fix the issue reported by Fengguang Wu:
> > Note: the f2fs/linux-3.4 HEAD 22a48d188024830d61365ce97a0a8a0bedd494a9 builds fine.
> > It only hurts bisectibility.
> >
> > All error/warnings:
> >
> > In file included from fs/f2fs/data.c:22:0:
> > fs/f2fs/data.c: In function 'f2fs_direct_IO':
> > >> fs/f2fs/f2fs.h:1302:12: error: inlining failed in call to
> > >> always_inline 'f2fs_has_inline_data': function body not available
> > inline int f2fs_has_inline_data(struct inode *);
> ..snip..
>
> Signed-off-by: Haicheng Li <haicheng.li@linux.intel.com>
> Reported-by: Fengguang Wu <fengguang.wu@intel.com>
> Cc: Huajun Li <huajun.li@intel.com>
> ---
> fs/f2fs/f2fs.h | 5 ++++-
> fs/f2fs/inline.c | 5 -----
> 2 files changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
> index 6991a28..e143ca1 100644
> --- a/fs/f2fs/f2fs.h
> +++ b/fs/f2fs/f2fs.h
> @@ -1314,7 +1314,10 @@ extern const struct inode_operations f2fs_special_inode_operations;
> /*
> * inline.c
> */
> -inline int f2fs_has_inline_data(struct inode *);
> +static inline int f2fs_has_inline_data(struct inode *inode)
> +{
> + return is_inode_flag_set(F2FS_I(inode), FI_INLINE_DATA);
> +}
> bool f2fs_may_inline(struct inode *);
> int f2fs_read_inline_data(struct inode *, struct page *);
> int f2fs_convert_inline_data(struct inode *, pgoff_t);
> diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
> index 0e940ce..bcc6f65 100644
> --- a/fs/f2fs/inline.c
> +++ b/fs/f2fs/inline.c
> @@ -13,11 +13,6 @@
>
> #include "f2fs.h"
>
> -inline int f2fs_has_inline_data(struct inode *inode)
> -{
> - return is_inode_flag_set(F2FS_I(inode), FI_INLINE_DATA);
> -}
> -
> bool f2fs_may_inline(struct inode *inode)
> {
> struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb);
--
Jaegeuk Kim
Samsung
--
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/
==============================================================================
TOPIC: cpufreq: Fix timer/workqueue corruption by protecting reading governor_
enabled
http://groups.google.com/group/linux.kernel/t/1e2d65b016fd7b58?hl=en
==============================================================================
== 1 of 2 ==
Date: Fri, Dec 27 2013 1:40 am
From:
From: Jane Li <jiel@marvell.com>
When a CPU is hot removed we'll cancel all the delayed work items via
gov_cancel_work(). Sometimes the delayed work function determines that
it should adjust the delay for all other CPUs that the policy is
managing. If this scenario occurs, the canceling CPU will cancel its own
work but queue up the other CPUs works to run.
Commit 3617f2(cpufreq: Fix timer/workqueue corruption due to double
queueing) has tried to fix this, but reading governor_enabled is not
protected by cpufreq_governor_lock. Even though od_dbs_timer() checks
governor_enabled before gov_queue_work(), this scenario may occur. For
example:
CPU0 CPU1
---- ----
cpu_down()
... <work runs>
__cpufreq_remove_dev() od_dbs_timer()
__cpufreq_governor() policy->governor_enabled
policy->governor_enabled = false;
cpufreq_governor_dbs()
case CPUFREQ_GOV_STOP:
gov_cancel_work(dbs_data, policy);
cpu0 work is canceled
timer is canceled
cpu1 work is canceled
<waits for cpu1>
gov_queue_work(*, *, true);
cpu0 work queued
cpu1 work queued
cpu2 work queued
...
cpu1 work is canceled
cpu2 work is canceled
...
At the end of the GOV_STOP case cpu0 still has a work queued to
run although the code is expecting all of the works to be
canceled. __cpufreq_remove_dev() will then proceed to
re-initialize all the other CPUs works except for the CPU that is
going down. The CPUFREQ_GOV_START case in cpufreq_governor_dbs()
will trample over the queued work and debugobjects will spit out
a warning:
WARNING: at lib/debugobjects.c:260 debug_print_object+0x94/0xbc()
ODEBUG: init active (active state 0) object type: timer_list hint: delayed_work_timer_fn+0x0/0x14
Modules linked in:
CPU: 1 PID: 1205 Comm: sh Tainted: G W 3.10.0 #200
[<c01144f0>] (unwind_backtrace+0x0/0xf8) from [<c0111d98>] (show_stack+0x10/0x14)
[<c0111d98>] (show_stack+0x10/0x14) from [<c01272cc>] (warn_slowpath_common+0x4c/0x68)
[<c01272cc>] (warn_slowpath_common+0x4c/0x68) from [<c012737c>] (warn_slowpath_fmt+0x30/0x40)
[<c012737c>] (warn_slowpath_fmt+0x30/0x40) from [<c034c640>] (debug_print_object+0x94/0xbc)
[<c034c640>] (debug_print_object+0x94/0xbc) from [<c034c7f8>] (__debug_object_init+0xc8/0x3c0)
[<c034c7f8>] (__debug_object_init+0xc8/0x3c0) from [<c01360e0>] (init_timer_key+0x20/0x104)
[<c01360e0>] (init_timer_key+0x20/0x104) from [<c04872ac>] (cpufreq_governor_dbs+0x1dc/0x68c)
[<c04872ac>] (cpufreq_governor_dbs+0x1dc/0x68c) from [<c04833a8>] (__cpufreq_governor+0x80/0x1b0)
[<c04833a8>] (__cpufreq_governor+0x80/0x1b0) from [<c0483704>] (__cpufreq_remove_dev.isra.12+0x22c/0x380)
[<c0483704>] (__cpufreq_remove_dev.isra.12+0x22c/0x380) from [<c0692f38>] (cpufreq_cpu_callback+0x48/0x5c)
[<c0692f38>] (cpufreq_cpu_callback+0x48/0x5c) from [<c014fb40>] (notifier_call_chain+0x44/0x84)
[<c014fb40>] (notifier_call_chain+0x44/0x84) from [<c012ae44>] (__cpu_notify+0x2c/0x48)
[<c012ae44>] (__cpu_notify+0x2c/0x48) from [<c068dd40>] (_cpu_down+0x80/0x258)
[<c068dd40>] (_cpu_down+0x80/0x258) from [<c068df40>] (cpu_down+0x28/0x3c)
[<c068df40>] (cpu_down+0x28/0x3c) from [<c068e4c0>] (store_online+0x30/0x74)
[<c068e4c0>] (store_online+0x30/0x74) from [<c03a7308>] (dev_attr_store+0x18/0x24)
[<c03a7308>] (dev_attr_store+0x18/0x24) from [<c0256fe0>] (sysfs_write_file+0x100/0x180)
[<c0256fe0>] (sysfs_write_file+0x100/0x180) from [<c01fec9c>] (vfs_write+0xbc/0x184)
[<c01fec9c>] (vfs_write+0xbc/0x184) from [<c01ff034>] (SyS_write+0x40/0x68)
[<c01ff034>] (SyS_write+0x40/0x68) from [<c010e200>] (ret_fast_syscall+0x0/0x48)
In gov_queue_work(), lock cpufreq_governor_lock before gov_queue_work,
and unlock it after __gov_queue_work(). In this way, governor_enabled
is guaranteed not changed in gov_queue_work().
Signed-off-by: Jane Li <jiel@marvell.com>
---
drivers/cpufreq/cpufreq.c | 1 -
drivers/cpufreq/cpufreq_governor.c | 6 +++++-
include/linux/cpufreq.h | 1 +
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 02d534d..50601f6 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -39,7 +39,6 @@ static struct cpufreq_driver *cpufreq_driver;
static DEFINE_PER_CPU(struct cpufreq_policy *, cpufreq_cpu_data);
static DEFINE_PER_CPU(struct cpufreq_policy *, cpufreq_cpu_data_fallback);
static DEFINE_RWLOCK(cpufreq_driver_lock);
-static DEFINE_MUTEX(cpufreq_governor_lock);
static LIST_HEAD(cpufreq_policy_list);
#ifdef CONFIG_HOTPLUG_CPU
diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c
index e6be635..11b9f0b 100644
--- a/drivers/cpufreq/cpufreq_governor.c
+++ b/drivers/cpufreq/cpufreq_governor.c
@@ -119,8 +119,11 @@ void gov_queue_work(struct dbs_data *dbs_data, struct cpufreq_policy *policy,
{
int i;
- if (!policy->governor_enabled)
+ mutex_lock(&cpufreq_governor_lock);
+ if (!policy->governor_enabled) {
+ mutex_unlock(&cpufreq_governor_lock);
return;
+ }
if (!all_cpus) {
/*
@@ -135,6 +138,7 @@ void gov_queue_work(struct dbs_data *dbs_data, struct cpufreq_policy *policy,
for_each_cpu(i, policy->cpus)
__gov_queue_work(i, dbs_data, delay);
}
+ mutex_unlock(&cpufreq_governor_lock);
}
EXPORT_SYMBOL_GPL(gov_queue_work);
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index dc196bb..4faafe7 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -254,6 +254,7 @@ struct cpufreq_driver {
int cpufreq_register_driver(struct cpufreq_driver *driver_data);
int cpufreq_unregister_driver(struct cpufreq_driver *driver_data);
+static DEFINE_MUTEX(cpufreq_governor_lock);
const char *cpufreq_get_current_driver(void);
--
1.7.9.5
--
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/
== 2 of 2 ==
Date: Fri, Dec 27 2013 1:50 am
From: Viresh Kumar
On 27 December 2013 15:00, <jiel@marvell.com> wrote:
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> -static DEFINE_MUTEX(cpufreq_governor_lock);
> diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
> index dc196bb..4faafe7 100644
> --- a/include/linux/cpufreq.h
> +++ b/include/linux/cpufreq.h
> @@ -254,6 +254,7 @@ struct cpufreq_driver {
>
> int cpufreq_register_driver(struct cpufreq_driver *driver_data);
> int cpufreq_unregister_driver(struct cpufreq_driver *driver_data);
> +static DEFINE_MUTEX(cpufreq_governor_lock);
No way, this would never work. This would create separate locks
in each file that includes cpufreq.h. And so the locks you are talking
about wouldn't protect governor.
Have you actually tested this code? If this fixes the breakage you
saw? If this fixes it then you need to do better investigation of your
problem..
you actually need to remove the static keyword from cpufreq.c file.
Nothing else.
--
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/
==============================================================================
TOPIC: net: igbvf: slight optimization of addr compare
http://groups.google.com/group/linux.kernel/t/6552e236459e977b?hl=en
==============================================================================
== 1 of 1 ==
Date: Fri, Dec 27 2013 1:50 am
From: Jeff Kirsher
On Fri, 2013-12-27 at 14:48 +0800, Ding Tianhong wrote:
> Use possibly more efficient ether_addr_equal
> to instead of memcmp.
>
> Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Cc: Carolyn Wyborny <carolyn.wyborny@intel.com>
> Cc: Don Skidmore <donald.c.skidmore@intel.com>
> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
> ---
> drivers/net/ethernet/intel/igbvf/netdev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks Ding, I have added this patch to my queue.
==============================================================================
TOPIC: ARM: omapfb: Add early framebuffer memory allocator
http://groups.google.com/group/linux.kernel/t/27241acfc4476030?hl=en
==============================================================================
== 1 of 1 ==
Date: Fri, Dec 27 2013 1:50 am
From: Pavel Machek
On Thu 2013-12-26 01:12:39, Ivaylo Dimitrov wrote:
> From: Ivaylo Dimitrov <freemangordon@abv.bg>
>
> On memory limited devices, CMA fails easily when asked to allocate big
> chunks of memory like framebuffer memory needed for video playback.
>
> Add boot parameter "omapfb_memsize" which allocates memory to be used
> as dma coherent memory, so dma_alloc_attrs won't hit CMA allocator when
> trying to allocate memory for the framebuffers
>
> Signed-off-by: Ivaylo Dimitrov <freemangordon@abv.bg>
Hmm, would it make sense to add a parameter to reserve certain ammount
of memory for CMA? omapfb is probably not the only user hitting
this...?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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/
==============================================================================
TOPIC: mm/slub: fix accumulate per cpu partial cache objects
http://groups.google.com/group/linux.kernel/t/0cb324ae47631dd0?hl=en
==============================================================================
== 1 of 1 ==
Date: Fri, Dec 27 2013 1:50 am
From: Wanpeng Li
SLUB per cpu partial cache is a list of slab caches to accelerate objects
allocation. However, current codes just accumulate the objects number of
the first slab cache of per cpu partial cache instead of traverse the whole
list.
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
---
mm/slub.c | 32 +++++++++++++++++++++++---------
1 files changed, 23 insertions(+), 9 deletions(-)
diff --git a/mm/slub.c b/mm/slub.c
index 545a170..799bfdc 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -4280,7 +4280,7 @@ static ssize_t show_slab_objects(struct kmem_cache *s,
struct kmem_cache_cpu *c = per_cpu_ptr(s->cpu_slab,
cpu);
int node;
- struct page *page;
+ struct page *page, *p;
page = ACCESS_ONCE(c->page);
if (!page)
@@ -4298,8 +4298,9 @@ static ssize_t show_slab_objects(struct kmem_cache *s,
nodes[node] += x;
page = ACCESS_ONCE(c->partial);
- if (page) {
- x = page->pobjects;
+ while ((p = page)) {
+ page = p->next;
+ x = p->pobjects;
total += x;
nodes[node] += x;
}
@@ -4520,13 +4521,15 @@ static ssize_t slabs_cpu_partial_show(struct kmem_cache *s, char *buf)
int pages = 0;
int cpu;
int len;
+ struct page *p;
for_each_online_cpu(cpu) {
struct page *page = per_cpu_ptr(s->cpu_slab, cpu)->partial;
- if (page) {
- pages += page->pages;
- objects += page->pobjects;
+ while ((p = page)) {
+ page = p->next;
+ pages += p->pages;
+ objects += p->pobjects;
}
}
@@ -4535,10 +4538,21 @@ static ssize_t slabs_cpu_partial_show(struct kmem_cache *s, char *buf)
#ifdef CONFIG_SMP
for_each_online_cpu(cpu) {
struct page *page = per_cpu_ptr(s->cpu_slab, cpu) ->partial;
+ objects = 0;
+ pages = 0;
+
+ if (!page)
+ continue;
+
+ while ((p = page)) {
+ page = p->next;
+ pages += p->pages;
+ objects += p->pobjects;
+ }
- if (page && len < PAGE_SIZE - 20)
- len += sprintf(buf + len, " C%d=%d(%d)", cpu,
- page->pobjects, page->pages);
+ if (len < PAGE_SIZE - 20)
+ len += sprintf(buf + len, " C%d=%d(%d)", cpu,
+ objects, pages);
}
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home