[PATCH 1/2] Fix build error caused by broken PCH_PTP module dependency.

2012-09-24 Thread Haicheng Li
From 1b4ae11bacfd2eedda1fd0e1ce1d37b678e2f009 Mon Sep 17 00:00:00 2001 From: Haicheng Li haicheng...@linux.intel.com Date: Mon, 24 Sep 2012 15:01:33 +0800 Subject: [PATCH 1/2] Fix build error caused by broken PCH_PTP module dependency. The .config is: CONFIG_PCH_GBE=y

[PATCH 2/2] Fix wrong description in PTP_1588_CLOCK_PCH help info.

2012-09-24 Thread Haicheng Li
From a206a006d82c327ba308674c608fbd6c9ce1e702 Mon Sep 17 00:00:00 2001 From: Haicheng Li haicheng...@linux.intel.com Date: Mon, 24 Sep 2012 15:02:41 +0800 Subject: [PATCH 2/2] Fix wrong description in PTP_1588_CLOCK_PCH help info. Signed-off-by: Haicheng Li haicheng@gmail.com --- drivers

[Updated PATCH 1/2] Fix build error caused by broken PCH_PTP module dependency.

2012-09-24 Thread Haicheng Li
this version would be more clean: From 898e3214b3406c620571cedf704719784b0df049 Mon Sep 17 00:00:00 2001 From: Haicheng Li haicheng...@linux.intel.com Date: Mon, 24 Sep 2012 15:52:30 +0800 Subject: [PATCH 1/2] Fix build error caused by broken PCH_PTP module dependency. The .config

[Updated PATCH 2/2] Fix a typo in PTP_1588_CLOCK_PCH Kconfig help info.

2012-09-24 Thread Haicheng Li
pls. ignore original one, and use this instead: From 5911413366d37aafcc19ddfc9c0f2db31855431e Mon Sep 17 00:00:00 2001 From: Haicheng Li haicheng...@linux.intel.com Date: Mon, 24 Sep 2012 15:55:27 +0800 Subject: [PATCH 2/2] Fix a typo in PTP_1588_CLOCK_PCH Kconfig help info. Signed-off

[PATCH 1/2] Fix build error caused by broken PCH_PTP module dependency.

2012-09-24 Thread Haicheng Li
From 898e3214b3406c620571cedf704719784b0df049 Mon Sep 17 00:00:00 2001 From: Haicheng Li haicheng...@linux.intel.com Date: Mon, 24 Sep 2012 15:52:30 +0800 Subject: [PATCH 1/2] Fix build error caused by broken PCH_PTP module dependency. The .config is: CONFIG_PCH_GBE=y

[PATCH 2/2] Fix a typo in PTP_1588_CLOCK_PCH Kconfig help info.

2012-09-24 Thread Haicheng Li
From 5911413366d37aafcc19ddfc9c0f2db31855431e Mon Sep 17 00:00:00 2001 From: Haicheng Li haicheng...@linux.intel.com Date: Mon, 24 Sep 2012 15:55:27 +0800 Subject: [PATCH 2/2] Fix a typo in PTP_1588_CLOCK_PCH Kconfig help info. Signed-off-by: Haicheng Li haicheng@gmail.com --- drivers/ptp

Re: [PATCH 1/2] Fix build error caused by broken PCH_PTP module dependency.

2012-09-28 Thread Haicheng Li
config would be either PTP_1588_CLOCK_PCH=PCH_GBE=m or PTP_1588_CLOCK_PCH=PCH_GBE=y, and PTP_1588_CLOCK_PCH depends on PCH_GBE. So are you ok with this: + depends on PTP_1588_CLOCK_PCH (PCH_GBE=m || PTP_1588_CLOCK_PCH=y) or simply like: --- From: Haicheng Li haicheng@gmail.com Fix

Re: [PATCH 2/2] Fix a typo in PTP_1588_CLOCK_PCH Kconfig help info.

2012-09-28 Thread Haicheng Li
On 09/28/2012 06:06 AM, David Miller wrote: - will be called ptp_pch. + will be called by pch_ptp. The original sentence is correct, it is stating the name of the module that will be built not the module that will call it. You're right. Rather, the pch_ptp is what might need

Re: [PATCH 1/2] Fix build error caused by broken PCH_PTP module dependency.

2012-09-28 Thread Haicheng Li
On 09/28/2012 02:46 PM, David Miller wrote: From: Haicheng Lihaicheng...@linux.intel.com Date: Fri, 28 Sep 2012 14:41:43 +0800 On 09/28/2012 06:09 AM, David Miller wrote: Look at how other people submit patches, do any other patch submissions look like your's having all of this metadata in

Re: [net:master 1/9] pch_gbe_main.c:(.text+0x510370): undefined reference to `pch_ch_control_write'

2012-10-06 Thread Haicheng Li
is not good idea as it won't visit the dependencies. David, I would still suggest to take my original patch: https://lkml.org/lkml/2012/9/28/70 +depends on PTP_1588_CLOCK_PCH (PCH_GBE=m || PTP_1588_CLOCK_PCH=y) or simply like: --- From: Haicheng Li haicheng@gmail.com Fix build error

Re: [net:master 1/9] pch_gbe_main.c:(.text+0x510370): undefined reference to `pch_ch_control_write'

2012-10-06 Thread Haicheng Li
On 10/06/2012 09:22 PM, David Miller wrote: From: Haicheng Lihaicheng...@linux.intel.com Date: Sat, 06 Oct 2012 20:07:08 +0800 The failure is due to the CONFIG_PPS is not set there, consequently CONFIG_PTP_1588_CLOCK can not be set as =y anyway. So David's patch of

Re: [net:master 1/9] pch_gbe_main.c:(.text+0x510370): undefined reference to `pch_ch_control_write'

2012-10-06 Thread Haicheng Li
On 10/06/2012 10:21 PM, David Miller wrote: From: Haicheng Lihaicheng...@linux.intel.com Date: Sat, 06 Oct 2012 22:07:23 +0800 On 10/06/2012 09:22 PM, David Miller wrote: From: Haicheng Lihaicheng...@linux.intel.com Date: Sat, 06 Oct 2012 20:07:08 +0800 The failure is due to the

[PATCH] Fix PTP dependencies: explicitly select all the possible dependencies.

2012-10-07 Thread Haicheng Li
* to fix such module co-dependency issues, this patch explicitly selects all the possible dependencies of PCH_PTP. Reported-by: Fengguang Wu fengguang...@intel.com Reviewed-by: David S. Miller da...@davemloft.net Signed-off-by: Haicheng Li haicheng@gmail.com --- drivers/net/ethernet/oki-semi

Re: [PATCH] pch_pge: Fix build error by selecting all the possible dependencies.

2012-10-08 Thread Haicheng Li
Just realized a typo in the subject, pls. ignore this. will send a new soon. sorry. On 10/08/2012 12:29 PM, Haicheng Li wrote: Fengguang reported a kernel build failure as folowing: drivers/built-in.o: In function `pch_gbe_ioctl': pch_gbe_main.c:(.text+0x510370): undefined reference

[PATCH] pch_gbe: Fix build error by selecting all the possible dependencies.

2012-10-09 Thread Haicheng Li
* to fix such module co-dependency issues, this patch explicitly selects all the possible dependencies of PCH_PTP. Reported-by: Fengguang Wu fengguang...@intel.com Reviewed-by: David S. Miller da...@davemloft.net Signed-off-by: Haicheng Li haicheng@gmail.com --- drivers/net/ethernet/oki-semi

[PATCH 1/2] f2fs: use true and false for boolean value

2013-10-18 Thread Haicheng Li
Signed-off-by: Haicheng Li haicheng...@linux.intel.com --- fs/f2fs/segment.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 3b20359..862fef3 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1277,9 +1277,9 @@ static

[PATCH 2/2] f2fs: no need to check other dirty_segmap when the seg has been found

2013-10-18 Thread Haicheng Li
Because one dirty seg can only be mapped to one dirty_type. Otherwise, it's a bug. Signed-off-by: Haicheng Li haicheng...@linux.intel.com --- fs/f2fs/segment.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 862fef3

Re: [f2fs-dev] [PATCH 1/2] f2fs: disable the extent cache ops on high fragmented files

2013-11-20 Thread Haicheng Li
Signed-off-by: Jaegeuk Kim jaegeuk@samsung.com Function looks good to me. But some nitpicking below for code cleanup.. @@ -71,6 +71,9 @@ static int check_extent_cache(struct inode *inode, pgoff_t pgofs, return value could be boolean? pgoff_t start_fofs, end_fofs; block_t

Re: [PATCH] f2fs: optimize alloc_nid_failed()

2013-05-06 Thread Haicheng Li
version of my recent f2fs patches soon later, which will be based on the f2fs-dev tree. On Mon, May 06, 2013 at 07:25:06PM +0800, Haicheng Li wrote: Current alloc_nid_failed() has two issues: 1. unecessarily kmem_cache_free() the free_nid and then realloc a new slab cache for it immediately; 2

[PATCH V2 0/4] f2fs: various optimization bugfixing for node management

2013-05-06 Thread Haicheng Li
dev branch. Haicheng Li (4): f2fs: bugfix for alloc_nid_failed() f2fs: code cleanup for scan_nat_page() and build_free_nids() f2fs: optimize scan_nat_page() f2fs: optimize build_free_nids() fs/f2fs/node.c | 31 --- 1 file changed, 20 insertions(+), 11

[PATCH 1/4] f2fs: bugfix for alloc_nid_failed()

2013-05-06 Thread Haicheng Li
to make sure nmi-fcnt is never 2 * MAX_FREE_NIDS. Signed-off-by: Haicheng Li haicheng...@linux.intel.com --- fs/f2fs/node.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 7209d63..532ac57 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs

[PATCH 2/4] f2fs: code cleanup for scan_nat_page() and build_free_nids()

2013-05-06 Thread Haicheng Li
This patch does two cleanups: 1. remove unused variable fcnt in build_free_nids(). 2. make scan_nat_page() as void type and remove useless variable fcnt. Signed-off-by: Haicheng Li haicheng...@linux.intel.com --- fs/f2fs/node.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions

[PATCH 3/4] f2fs: optimize scan_nat_page()

2013-05-06 Thread Haicheng Li
When nm_i-fcnt 2 * MAX_FREE_NIDS, stop scanning other NAT entries. Signed-off-by: Haicheng Li haicheng...@linux.intel.com --- fs/f2fs/node.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 1b45dd0..1fe3fe2 100644 --- a/fs

[PATCH 4/4] f2fs: optimize build_free_nids()

2013-05-06 Thread Haicheng Li
When nm_i-fcnt 2 * MAX_FREE_NIDS, stop scanning other NAT pages. Signed-off-by: Haicheng Li haicheng...@linux.intel.com --- fs/f2fs/node.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 1fe3fe2..3136224 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs

Re: [PATCH 3/4] f2fs: optimize scan_nat_page()

2013-05-07 Thread Haicheng Li
On Tue, May 07, 2013 at 07:36:28PM +0900, Jaegeuk Kim wrote: Hi, 2013-05-06 (월), 23:15 +0800, Haicheng Li: if (nm_i-fcnt 2 * MAX_FREE_NIDS) - return 0; + return -1; We should check all the handler of add_free_nid(). yes, sorry that I missed double checking

Re: [PATCH 4/4] f2fs: optimize build_free_nids()

2013-05-08 Thread Haicheng Li
On Tue, May 07, 2013 at 07:33:59PM +0900, Jaegeuk Kim wrote: 2013-05-06 (월), 23:15 +0800, Haicheng Li: diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 1fe3fe2..3136224 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1342,6 +1342,8 @@ static void build_free_nids(struct

Re: [PATCH 4/4] f2fs: optimize build_free_nids()

2013-05-08 Thread Haicheng Li
On Wed, May 08, 2013 at 06:50:04PM +0900, Jaegeuk Kim wrote: Could you explain when this can happen? I'm thinking of this possible scenario: as we don't hold any spinlock to protect the context, add_free_nid() could be called by other thread anytime, e.g. by the gc_thread_func() in

[PATCH 0/3] some optimization code cleanup

2013-06-13 Thread Haicheng Li
Fix some issues found by code review. Haicheng Li (3): f2fs: remove unnecessary parameter offset from __add_sum_entry() f2fs: make locate_dirty_segment() as static f2fs: optimize do_write_data_page() fs/f2fs/data.c|5 +++-- fs/f2fs/f2fs.h|1 - fs/f2fs/segment.c | 12

[PATCH 2/3] f2fs: make locate_dirty_segment() as static

2013-06-13 Thread Haicheng Li
It's used only locally and could be static. Signed-off-by: Haicheng Li haicheng...@linux.intel.com --- fs/f2fs/f2fs.h|1 - fs/f2fs/segment.c |2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index a05aa65..3e7cb33 100644 --- a/fs

[PATCH 1/3] f2fs: remove unnecessary parameter offset from __add_sum_entry()

2013-06-13 Thread Haicheng Li
We can get the value directly from pointer curseg. Signed-off-by: Haicheng Li haicheng...@linux.intel.com --- fs/f2fs/segment.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index be668ff..77f31c0 100644 --- a/fs/f2fs

[PATCH 3/3] f2fs: optimize do_write_data_page()

2013-06-13 Thread Haicheng Li
Since need_inplace_update() == true is a very rare case, using unlikely() to give compiler a chance to optimize the code. Signed-off-by: Haicheng Li haicheng...@linux.intel.com --- fs/f2fs/data.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs

Re: [PATCH 1/8] mm/writeback: fix wb_do_writeback exported unsafely

2013-06-14 Thread Haicheng Li
On Fri, Jun 14, 2013 at 03:30:34PM +0800, Wanpeng Li wrote: There is just one caller in fs-writeback.c call wb_do_writeback and current codes unnecessary export it in header file, this patch fix it by changing wb_do_writeback to static function. Signed-off-by: Wanpeng Li

[PATCH 1/2] f2fs: optimize scan_nat_page()

2013-05-03 Thread Haicheng Li
When nm_i-fcnt 2 * MAX_FREE_NIDS, stop scanning other NAT entries. Signed-off-by: Haicheng Li haicheng...@linux.intel.com --- fs/f2fs/node.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index e275218..6276467 100644

[PATCH 2/2] f2fs: optimize build_free_nids()

2013-05-03 Thread Haicheng Li
When nm_i-fcnt 2 * MAX_FREE_NIDS, stop scanning other NAT pages. Signed-off-by: Haicheng Li haicheng...@linux.intel.com --- fs/f2fs/node.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 6276467..31d038f 100644 --- a/fs/f2fs/node.c

[PATCH] f2fs: optimize alloc_nid_failed()

2013-05-06 Thread Haicheng Li
-by: Haicheng Li haicheng...@linux.intel.com --- fs/f2fs/node.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index e275218..7ce8e9f 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1403,8 +1403,21 @@ void alloc_nid_done(struct

Re: [RFC 0/5] Enable f2fs support inline data

2013-06-04 Thread Haicheng Li
. This RFC patch set is just to enable f2fs support inline data: files less than about 3.6K can be stored directly in inode block. TODO: make small dirs inline too. Haicheng Li (3): f2fs: Add helper functions and flag to support inline data f2fs: Add interface for inline data

[PATCH] writeback: make local functions as static

2013-05-29 Thread Haicheng Li
Functions not used globally should be static. Signed-off-by: Haicheng Li haicheng...@linux.intel.com --- fs/fs-writeback.c |7 +++ include/linux/writeback.h |5 - 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index

Re: [PATCH] writeback: make local functions as static

2013-05-31 Thread Haicheng Li
On Thu, May 30, 2013 at 11:21:21AM +0200, Jan Kara wrote: On Wed 29-05-13 21:49:38, Haicheng Li wrote: Functions not used globally should be static. I agree for wb_do_writeback(). Ok, thanks. You definitely shouldn't make writeback_inodes_sb_nr() static, that it part of generic writeback

[PATCH] writeback: make wb_do_writeback() as static

2013-06-02 Thread Haicheng Li
It's not used globally and could be static. Cc: Jan Kara j...@suse.cz Signed-off-by: Haicheng Li haicheng...@linux.intel.com --- fs/fs-writeback.c |2 +- include/linux/writeback.h |1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/fs-writeback.c b/fs/fs

Re: [RFC 5/5] f2fs: add tracepoints to debug inline data operations

2013-06-03 Thread Haicheng Li
On Mon, Jun 03, 2013 at 09:50:00AM -0400, Steven Rostedt wrote: Can you convert the above to use DECLARE_EVENT_CLASS() and DEFINE_EVENT(), as the above three are basically the same. You'll save a few K in text by doing so. sure, thank you for the review. + #endif /* _TRACE_F2FS_H */

[PATCH 1/2] f2fs: fix inconsistent using of NM_WOUT_THRESHOLD

2013-04-28 Thread Haicheng Li
the free_nats requests when NM_WOUT_THRESHOLD nm_i-nat_cnt 2 * NM_WOUT_THRESHOLD So fix the threshold check condition. Signed-off-by: Haicheng Li haicheng...@linux.intel.com --- fs/f2fs/node.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/node.c b/fs/f2fs

[PATCH 2/2] f2fs: remove useless #include linux/proc_fs.h as we're now using sysfs as debug entry.

2013-04-28 Thread Haicheng Li
Signed-off-by: Haicheng Li haicheng...@linux.intel.com --- fs/f2fs/debug.c |1 - fs/f2fs/gc.c|1 - fs/f2fs/super.c |1 - 3 files changed, 3 deletions(-) diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c index 025b9e2..08c9ce3 100644 --- a/fs/f2fs/debug.c +++ b/fs/f2fs/debug.c

Re: [PATCH] f2fs: introduce f2fs_kmem_cache_alloc to hide the unfailed kmem cache allocation

2013-10-21 Thread Haicheng Li
Looks neat. Reviewed-by: Haicheng Li haicheng...@linux.intel.com On Mon, Oct 21, 2013 at 03:24:55PM +0800, Gu Zheng wrote: Introduce the unfailed version of kmem_cache_alloc named f2fs_kmem_cache_alloc to hide the retry routine and make the code a bit cleaner. Signed-off-by: Gu Zheng guz.f

Re: [PATCH] f2fs: introduce f2fs_kmem_cache_alloc to hide the unfailed kmem cache allocation

2013-10-21 Thread Haicheng Li
On Tue, Oct 22, 2013 at 11:49:58AM +0800, Gao feng wrote: On 10/21/2013 03:24 PM, Gu Zheng wrote: +static inline void *f2fs_kmem_cache_alloc(struct kmem_cache *cachep, + gfp_t flags) +{ + void *entry = kmem_cache_alloc(cachep, flags); +retry:

Re: [PATCH] f2fs: introduce f2fs_kmem_cache_alloc to hide the unfailed kmem cache allocation

2013-10-21 Thread Haicheng Li
On Tue, Oct 22, 2013 at 10:45:48AM +0800, Haicheng Li wrote: Looks neat. Reviewed-by: Haicheng Li haicheng...@linux.intel.com pls. ignore this mail. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo

Re: [PATCH] f2fs: introduce f2fs_kmem_cache_alloc to hide the unfailed kmem cache allocation

2013-10-22 Thread Haicheng Li
On Tue, Oct 22, 2013 at 01:34:26PM +0800, Gu Zheng wrote: On 10/22/2013 01:16 PM, Haicheng Li wrote: On Tue, Oct 22, 2013 at 11:49:58AM +0800, Gao feng wrote: On 10/21/2013 03:24 PM, Gu Zheng wrote: +static inline void *f2fs_kmem_cache_alloc(struct kmem_cache *cachep

[PATCH] f2fs: use bool for booleans

2013-10-22 Thread Haicheng Li
Signed-off-by: Haicheng Li haicheng...@linux.intel.com --- fs/f2fs/checkpoint.c |4 ++-- fs/f2fs/f2fs.h |4 ++-- fs/f2fs/node.c |4 ++-- fs/f2fs/recovery.c |8 fs/f2fs/super.c |2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git

Re: [PATCH] f2fs: Remove BUG_ON in dec_valid_node_count

2013-05-13 Thread Haicheng Li
On Sun, May 12, 2013 at 10:46:27PM -0500, Chris Fries wrote: From: Chris Fries c.fr...@motorola.com Panic loops while running LTP fsstress has been able to get a disk into two different panic loops from dec_valid_node_count. f2fs.h:714 BUG_ON(sbi-total_valid_node_count count); This is

[PATCH] f2fs: remove unecessary variable and code

2013-05-14 Thread Haicheng Li
Code cleanup without behavior changed. Signed-off-by: Haicheng Li haicheng...@linux.intel.com --- fs/f2fs/segment.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index d8e84e4..3a0d027 100644 --- a/fs/f2fs

[PATCH] cachefiles: remove unused macro list_to_page()

2013-05-15 Thread Haicheng Li
Signed-off-by: Haicheng Li haicheng...@linux.intel.com --- fs/cachefiles/interface.c |2 -- 1 file changed, 2 deletions(-) diff --git a/fs/cachefiles/interface.c b/fs/cachefiles/interface.c index 746ce53..847ba6a 100644 --- a/fs/cachefiles/interface.c +++ b/fs/cachefiles/interface.c @@ -13,8

[PATCH 1/3] PCI: Add hide_device support to pci subsystem.

2013-07-03 Thread Haicheng Li
boot time, but also optimize the latency of system suspend and resume. To hide pci devices, just pass such parameters to kernel at boot stage: pci=hide=[domain:]bus:slot.func[; ...] Cc: Bjorn Helgaas bhelg...@google.com Cc: linux-...@vger.kernel.org Signed-off-by: Haicheng Li haicheng

[PATCH 2/3] doc: add the description for pci=hide kernel parameter.

2013-07-03 Thread Haicheng Li
Cc: Rob Landley r...@landley.net Cc: linux-...@vger.kernel.org Cc: linux-...@vger.kernel.org Signed-off-by: Haicheng Li haicheng...@linux.intel.com --- Documentation/kernel-parameters.txt |2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/kernel-parameters.txt b/Documentation

[PATCH 3/3] acpi: remove unused LIST_HEAD(acpi_device_list)

2013-07-03 Thread Haicheng Li
Cc: Len Brown l...@kernel.org Cc: Rafael J. Wysocki r...@sisk.pl Cc: linux-a...@vger.kernel.org Signed-off-by: Haicheng Li haicheng...@linux.intel.com --- drivers/acpi/scan.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 27da630..fcc0cdc

Re: [PATCH 2/3] doc: add the description for pci=hide kernel parameter.

2013-07-03 Thread Haicheng Li
On Wed, Jul 03, 2013 at 10:00:41AM -0600, Bjorn Helgaas wrote: On Wed, Jul 3, 2013 at 9:16 AM, Haicheng Li haicheng...@linux.intel.com wrote: Cc: Rob Landley r...@landley.net Cc: linux-...@vger.kernel.org Cc: linux-...@vger.kernel.org Signed-off-by: Haicheng Li haicheng

Re: [PATCH 3/3] acpi: remove unused LIST_HEAD(acpi_device_list)

2013-07-03 Thread Haicheng Li
On Wed, Jul 03, 2013 at 11:24:03PM +0200, Rafael J. Wysocki wrote: On Wednesday, July 03, 2013 11:16:18 PM Haicheng Li wrote: Cc: Len Brown l...@kernel.org Cc: Rafael J. Wysocki r...@sisk.pl Cc: linux-a...@vger.kernel.org Signed-off-by: Haicheng Li haicheng...@linux.intel.com

[PATCH] acpi: remove unused LIST_HEAD(acpi_device_list)

2013-07-03 Thread Haicheng Li
acpi_device_list is not used by acpi code anymore, could be removed. Signed-off-by: Haicheng Li haicheng...@linux.intel.com --- drivers/acpi/scan.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 27da630..fcc0cdc 100644 --- a/drivers/acpi

Re: [PATCH 1/3] PCI: Add hide_device support to pci subsystem.

2013-07-03 Thread Haicheng Li
On Wed, Jul 03, 2013 at 10:09:32AM -0600, Bjorn Helgaas wrote: On Wed, Jul 3, 2013 at 9:16 AM, Haicheng Li haicheng...@linux.intel.com wrote: With more and more SOCs having pci device integrated into chip (e.g. Intel Atom series), it's useful to add an interface to cleanly hide pci devices

Re: [PATCH 1/3] PCI: Add hide_device support to pci subsystem.

2013-07-09 Thread Haicheng Li
On Sun, Jul 07, 2013 at 10:43:35AM +0800, Jiang Liu wrote: On 07/04/2013 12:09 AM, Bjorn Helgaas wrote: On Wed, Jul 3, 2013 at 9:16 AM, Haicheng Li haicheng...@linux.intel.com wrote: With more and more SOCs having pci device integrated into chip (e.g. Intel Atom series), it's useful

Re: [PATCH 1/3] PCI: Add hide_device support to pci subsystem.

2013-07-09 Thread Haicheng Li
On Fri, Jul 05, 2013 at 11:28:40AM -0600, Bjorn Helgaas wrote: To hide pci devices, just pass such parameters to kernel at boot stage: pci=hide=[domain:]bus:slot.func[; ...] This doesn't seem generally useful to me. It might be useful as a development aid, and you can easily

[PATCH] f2fs: fix build warning for f2fs_has_inline_data()

2013-12-26 Thread Haicheng Li
': 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...@linux.intel.com Reported-by: Fengguang Wu fengguang...@intel.com Cc

Re: [PATCH] f2fs: fix build warning for f2fs_has_inline_data()

2013-12-27 Thread Haicheng Li
On Fri, Dec 27, 2013 at 06:22:03PM +0900, Jaegeuk Kim wrote: 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 yes, your patch should have fixed it. thanks. -- To unsubscribe from this list: send the line

[PATCH 1/2] f2fs: use true and false for boolean value

2013-10-18 Thread Haicheng Li
Signed-off-by: Haicheng Li --- fs/f2fs/segment.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 3b20359..862fef3 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1277,9 +1277,9 @@ static bool flush_sits_in_journal

[PATCH 2/2] f2fs: no need to check other dirty_segmap when the seg has been found

2013-10-18 Thread Haicheng Li
Because one dirty seg can only be mapped to one dirty_type. Otherwise, it's a bug. Signed-off-by: Haicheng Li --- fs/f2fs/segment.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 862fef3..5ff0524 100644 --- a/fs/f2fs

Re: [f2fs-dev] [PATCH 1/2] f2fs: disable the extent cache ops on high fragmented files

2013-11-20 Thread Haicheng Li
> Signed-off-by: Jaegeuk Kim Function looks good to me. But some nitpicking below for code cleanup.. > @@ -71,6 +71,9 @@ static int check_extent_cache(struct inode *inode, pgoff_t > pgofs, return value could be boolean? > pgoff_t start_fofs, end_fofs; > block_t start_blkaddr; > >

[PATCH] f2fs: remove unecessary variable and code

2013-05-14 Thread Haicheng Li
Code cleanup without behavior changed. Signed-off-by: Haicheng Li --- fs/f2fs/segment.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index d8e84e4..3a0d027 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c

[PATCH] cachefiles: remove unused macro list_to_page()

2013-05-15 Thread Haicheng Li
Signed-off-by: Haicheng Li --- fs/cachefiles/interface.c |2 -- 1 file changed, 2 deletions(-) diff --git a/fs/cachefiles/interface.c b/fs/cachefiles/interface.c index 746ce53..847ba6a 100644 --- a/fs/cachefiles/interface.c +++ b/fs/cachefiles/interface.c @@ -13,8 +13,6 @@ #include

[PATCH 1/2] f2fs: optimize scan_nat_page()

2013-05-03 Thread Haicheng Li
When nm_i->fcnt > 2 * MAX_FREE_NIDS, stop scanning other NAT entries. Signed-off-by: Haicheng Li --- fs/f2fs/node.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index e275218..6276467 100644 --- a/fs/f2fs/node.c ++

[PATCH 2/2] f2fs: optimize build_free_nids()

2013-05-03 Thread Haicheng Li
When nm_i->fcnt > 2 * MAX_FREE_NIDS, stop scanning other NAT pages. Signed-off-by: Haicheng Li --- fs/f2fs/node.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 6276467..31d038f 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/

[PATCH] f2fs: optimize alloc_nid_failed()

2013-05-06 Thread Haicheng Li
-by: Haicheng Li --- fs/f2fs/node.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index e275218..7ce8e9f 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1403,8 +1403,21 @@ void alloc_nid_done(struct f2fs_sb_info *sbi, nid_t

Re: [PATCH] f2fs: optimize alloc_nid_failed()

2013-05-06 Thread Haicheng Li
version of my recent f2fs patches soon later, which will be based on the f2fs-dev tree. On Mon, May 06, 2013 at 07:25:06PM +0800, Haicheng Li wrote: > Current alloc_nid_failed() has two issues: > 1. unecessarily kmem_cache_free() the free_nid and then realloc a new >slab cache for it im

[PATCH V2 0/4] f2fs: various optimization & bugfixing for node management

2013-05-06 Thread Haicheng Li
2fs dev branch. Haicheng Li (4): f2fs: bugfix for alloc_nid_failed() f2fs: code cleanup for scan_nat_page() and build_free_nids() f2fs: optimize scan_nat_page() f2fs: optimize build_free_nids() fs/f2fs/node.c | 31 --- 1 file changed, 20 insertions(+),

[PATCH 1/4] f2fs: bugfix for alloc_nid_failed()

2013-05-06 Thread Haicheng Li
We need to make sure nmi->fcnt is never > 2 * MAX_FREE_NIDS. Signed-off-by: Haicheng Li --- fs/f2fs/node.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 7209d63..532ac57 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/no

[PATCH 2/4] f2fs: code cleanup for scan_nat_page() and build_free_nids()

2013-05-06 Thread Haicheng Li
This patch does two cleanups: 1. remove unused variable "fcnt" in build_free_nids(). 2. make scan_nat_page() as void type and remove useless variable "fcnt". Signed-off-by: Haicheng Li --- fs/f2fs/node.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-)

[PATCH 3/4] f2fs: optimize scan_nat_page()

2013-05-06 Thread Haicheng Li
When nm_i->fcnt > 2 * MAX_FREE_NIDS, stop scanning other NAT entries. Signed-off-by: Haicheng Li --- fs/f2fs/node.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 1b45dd0..1fe3fe2 100644 --- a/fs/f2fs/node.c ++

[PATCH 4/4] f2fs: optimize build_free_nids()

2013-05-06 Thread Haicheng Li
When nm_i->fcnt > 2 * MAX_FREE_NIDS, stop scanning other NAT pages. Signed-off-by: Haicheng Li --- fs/f2fs/node.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 1fe3fe2..3136224 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1342,6 +

Re: [PATCH 3/4] f2fs: optimize scan_nat_page()

2013-05-07 Thread Haicheng Li
On Tue, May 07, 2013 at 07:36:28PM +0900, Jaegeuk Kim wrote: > Hi, > > 2013-05-06 (월), 23:15 +0800, Haicheng Li: > > if (nm_i->fcnt > 2 * MAX_FREE_NIDS) > > - return 0; > > + return -1; > > We should check all the handler of add_free

Re: [PATCH 4/4] f2fs: optimize build_free_nids()

2013-05-08 Thread Haicheng Li
On Tue, May 07, 2013 at 07:33:59PM +0900, Jaegeuk Kim wrote: > 2013-05-06 (월), 23:15 +0800, Haicheng Li: > > diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c > > index 1fe3fe2..3136224 100644 > > --- a/fs/f2fs/node.c > > +++ b/fs/f2fs/node.c > > @@ -1342,6 +1342,8 @@ s

Re: [PATCH 4/4] f2fs: optimize build_free_nids()

2013-05-08 Thread Haicheng Li
On Wed, May 08, 2013 at 06:50:04PM +0900, Jaegeuk Kim wrote: > > Could you explain when this can happen? > > > > I'm thinking of this possible scenario: > > > > as we don't hold any spinlock to protect the context, add_free_nid() could > > be > > called by other thread anytime, e.g. by the

Re: [PATCH] f2fs: Remove BUG_ON in dec_valid_node_count

2013-05-13 Thread Haicheng Li
On Sun, May 12, 2013 at 10:46:27PM -0500, Chris Fries wrote: > From: Chris Fries > > Panic loops while running LTP fsstress has been able to get > a disk into two different panic loops from dec_valid_node_count. > f2fs.h:714 BUG_ON(sbi->total_valid_node_count < count); This is interesting

Re: [PATCH] f2fs: introduce f2fs_kmem_cache_alloc to hide the unfailed kmem cache allocation

2013-10-21 Thread Haicheng Li
Looks neat. Reviewed-by: Haicheng Li On Mon, Oct 21, 2013 at 03:24:55PM +0800, Gu Zheng wrote: > Introduce the unfailed version of kmem_cache_alloc named f2fs_kmem_cache_alloc > to hide the retry routine and make the code a bit cleaner. > > Signed-off-by: Gu Zheng >

Re: [PATCH] f2fs: introduce f2fs_kmem_cache_alloc to hide the unfailed kmem cache allocation

2013-10-21 Thread Haicheng Li
On Tue, Oct 22, 2013 at 11:49:58AM +0800, Gao feng wrote: > On 10/21/2013 03:24 PM, Gu Zheng wrote: > > +static inline void *f2fs_kmem_cache_alloc(struct kmem_cache *cachep, > > + gfp_t flags) > > +{ > > + void *entry = kmem_cache_alloc(cachep, flags); >

Re: [PATCH] f2fs: introduce f2fs_kmem_cache_alloc to hide the unfailed kmem cache allocation

2013-10-21 Thread Haicheng Li
On Tue, Oct 22, 2013 at 10:45:48AM +0800, Haicheng Li wrote: > Looks neat. > > Reviewed-by: Haicheng Li pls. ignore this mail. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majo

Re: [PATCH] f2fs: introduce f2fs_kmem_cache_alloc to hide the unfailed kmem cache allocation

2013-10-22 Thread Haicheng Li
On Tue, Oct 22, 2013 at 01:34:26PM +0800, Gu Zheng wrote: > On 10/22/2013 01:16 PM, Haicheng Li wrote: > > > On Tue, Oct 22, 2013 at 11:49:58AM +0800, Gao feng wrote: > >> On 10/21/2013 03:24 PM, Gu Zheng wrote: > >>> +static inline void *f2fs_kmem_cach

[PATCH] f2fs: use bool for booleans

2013-10-22 Thread Haicheng Li
Signed-off-by: Haicheng Li --- fs/f2fs/checkpoint.c |4 ++-- fs/f2fs/f2fs.h |4 ++-- fs/f2fs/node.c |4 ++-- fs/f2fs/recovery.c |8 fs/f2fs/super.c |2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/fs/f2fs/checkpoint.c b/fs

[PATCH] writeback: make local functions as static

2013-05-29 Thread Haicheng Li
Functions not used globally should be static. Signed-off-by: Haicheng Li --- fs/fs-writeback.c |7 +++ include/linux/writeback.h |5 - 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 3be5718..1d66062 100644

Re: [PATCH] writeback: make local functions as static

2013-05-31 Thread Haicheng Li
On Thu, May 30, 2013 at 11:21:21AM +0200, Jan Kara wrote: > On Wed 29-05-13 21:49:38, Haicheng Li wrote: > > Functions not used globally should be static. > I agree for wb_do_writeback(). Ok, thanks. > You definitely shouldn't make > writeback_inodes_sb_nr() static, that

[PATCH] writeback: make wb_do_writeback() as static

2013-06-02 Thread Haicheng Li
It's not used globally and could be static. Cc: Jan Kara Signed-off-by: Haicheng Li --- fs/fs-writeback.c |2 +- include/linux/writeback.h |1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 3be5718..f892dec 100644

Re: [RFC 5/5] f2fs: add tracepoints to debug inline data operations

2013-06-03 Thread Haicheng Li
On Mon, Jun 03, 2013 at 09:50:00AM -0400, Steven Rostedt wrote: > Can you convert the above to use DECLARE_EVENT_CLASS() and > DEFINE_EVENT(), as the above three are basically the same. You'll save a > few K in text by doing so. sure, thank you for the review. > > > + > > #endif /*

Re: [RFC 0/5] Enable f2fs support inline data

2013-06-04 Thread Haicheng Li
> >> f2fs inode is so large, small files can be stored directly in the inode, > >> rather than just storing a single block address and storing the data > >> elsewhere. > >> > >> This RFC patch set is just to enable f2fs support inline data: files le

[PATCH 1/2] f2fs: fix inconsistent using of NM_WOUT_THRESHOLD

2013-04-28 Thread Haicheng Li
WOUT_THRESHOLD)" , which will ignore the free_nats requests when NM_WOUT_THRESHOLD < nm_i->nat_cnt < 2 * NM_WOUT_THRESHOLD So fix the threshold check condition. Signed-off-by: Haicheng Li --- fs/f2fs/node.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH 2/2] f2fs: remove useless #include as we're now using sysfs as debug entry.

2013-04-28 Thread Haicheng Li
Signed-off-by: Haicheng Li --- fs/f2fs/debug.c |1 - fs/f2fs/gc.c|1 - fs/f2fs/super.c |1 - 3 files changed, 3 deletions(-) diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c index 025b9e2..08c9ce3 100644 --- a/fs/f2fs/debug.c +++ b/fs/f2fs/debug.c @@ -13,7 +13,6 @@ #include

[PATCH] f2fs: fix build warning for f2fs_has_inline_data()

2013-12-26 Thread Haicheng Li
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 Reported-by: Fen

Re: [PATCH] f2fs: fix build warning for f2fs_has_inline_data()

2013-12-27 Thread Haicheng Li
On Fri, Dec 27, 2013 at 06:22:03PM +0900, Jaegeuk Kim wrote: > 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 yes, your patch should have fixed it. thanks. -- To unsubscribe from this list: send the line

[PATCH 1/3] PCI: Add hide_device support to pci subsystem.

2013-07-03 Thread Haicheng Li
boot time, but also optimize the latency of system suspend and resume. To hide pci devices, just pass such parameters to kernel at boot stage: pci=hide=[:]:.[; ...] Cc: Bjorn Helgaas Cc: linux-...@vger.kernel.org Signed-off-by: Haicheng Li --- drivers/pci/pci.c |2 ++ drivers/pci

[PATCH 2/3] doc: add the description for pci=hide kernel parameter.

2013-07-03 Thread Haicheng Li
Cc: Rob Landley Cc: linux-...@vger.kernel.org Cc: linux-...@vger.kernel.org Signed-off-by: Haicheng Li --- Documentation/kernel-parameters.txt |2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 2fe6e76

[PATCH 3/3] acpi: remove unused LIST_HEAD(acpi_device_list)

2013-07-03 Thread Haicheng Li
Cc: Len Brown Cc: "Rafael J. Wysocki" Cc: linux-a...@vger.kernel.org Signed-off-by: Haicheng Li --- drivers/acpi/scan.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 27da630..fcc0cdc 100644 --- a/drivers/acpi/scan.c +++ b/dr

Re: [PATCH 2/3] doc: add the description for pci=hide kernel parameter.

2013-07-03 Thread Haicheng Li
On Wed, Jul 03, 2013 at 10:00:41AM -0600, Bjorn Helgaas wrote: > On Wed, Jul 3, 2013 at 9:16 AM, Haicheng Li > wrote: > > Cc: Rob Landley > > Cc: linux-...@vger.kernel.org > > Cc: linux-...@vger.kernel.org > > Signed-off-by: Haicheng Li > > --- > >

Re: [PATCH 3/3] acpi: remove unused LIST_HEAD(acpi_device_list)

2013-07-03 Thread Haicheng Li
On Wed, Jul 03, 2013 at 11:24:03PM +0200, Rafael J. Wysocki wrote: > On Wednesday, July 03, 2013 11:16:18 PM Haicheng Li wrote: > > Cc: Len Brown > > Cc: "Rafael J. Wysocki" > > Cc: linux-a...@vger.kernel.org > > Signed-off-by: Haicheng Li > > -ENO

[PATCH] acpi: remove unused LIST_HEAD(acpi_device_list)

2013-07-03 Thread Haicheng Li
acpi_device_list is not used by acpi code anymore, could be removed. Signed-off-by: Haicheng Li --- drivers/acpi/scan.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 27da630..fcc0cdc 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi

Re: [PATCH 1/3] PCI: Add hide_device support to pci subsystem.

2013-07-03 Thread Haicheng Li
On Wed, Jul 03, 2013 at 10:09:32AM -0600, Bjorn Helgaas wrote: > On Wed, Jul 3, 2013 at 9:16 AM, Haicheng Li > wrote: > > With more and more SOCs having pci device integrated into chip (e.g. Intel > > Atom series), it's useful to add an interface to cleanly hide pci devices

  1   2   >