aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/zcache
AgeCommit message (Collapse)AuthorFilesLines
2013-08-12staging: zcache: delete itGreg Kroah-Hartman28-11640/+0
zcache is obsolete and not used anymore, Bob Liu has rewritten it and is submitting it for inclusion through the main -mm tree, as it should have been done in the first place... Cc: Bob Liu <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Cc: Kyungmin Park <[email protected]> Cc: Wanpeng Li <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-08-12Merge 3.11-rc5 into staging-nextGreg Kroah-Hartman1-2/+4
We want the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-08-05staging/zcache: Fix memory leak while dropping an o2net_sock_container objectJie Liu1-0/+3
Free sc->sc_page when releasing a struct o2net_sock_container object to avoid memory leaks. This issue has been fixed by Younger Liu for OCFS2, so I sync that patch to zcache as we share the same network code base. Cc: Younger Liu <[email protected]> Cc: Bob Liu <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Jie Liu <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-07-29staging: zcache: fix "zcache=" kernel parameterPiotr Sarna1-2/+4
Commit 835f2f5 ("staging: zcache: enable zcache to be built/loaded as a module") introduced an incorrect handling of "zcache=" parameter. Inside zcache_comp_init() function, zcache_comp_name variable is checked for being empty. If not empty, the above variable is tested for being compatible with Crypto API. Unfortunately, after that function ends unconditionally (by the "goto out" directive) and returns: - non-zero value if verification succeeded, wrongly indicating an error - zero value if verification failed, falsely informing that function zcache_comp_init() ended properly. A solution to this problem is as following: 1. Move the "goto out" directive inside the "if (!ret)" statement 2. In case that crypto_has_comp() returned 0, change the value of ret to non-zero before "goto out" to indicate an error. This patch replaces an earlier one from Michal Hocko (based on report from Cristian Rodriguez): http://permalink.gmane.org/gmane.linux.kernel.mm/102484 It also addressed the same issue but didn't fix the zcache_comp_init() for case when the compressor data passed to "zcache=" option was invalid or unsupported. Signed-off-by: Piotr Sarna <[email protected]> [bzolnier: updated patch description] Acked-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Acked-by: Konrad Rzeszutek Wilk <[email protected]> Acked-by: Michal Hocko <[email protected]> Cc: stable <[email protected]> # 3.10 Cc: Cristian Rodriguez <[email protected]> Cc: Bob Liu <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-05-30drivers: staging: zcache: fix compile errorBob Liu3-6/+6
Fix below compile error: drivers/built-in.o: In function `zcache_pampd_free': >> zcache-main.c:(.text+0xb1c8a): undefined reference to `ramster_pampd_free' >> zcache-main.c:(.text+0xb1cbc): undefined reference to `ramster_count_foreign_pages' drivers/built-in.o: In function `zcache_pampd_get_data_and_free': >> zcache-main.c:(.text+0xb1f05): undefined reference to `ramster_count_foreign_pages' drivers/built-in.o: In function `zcache_cpu_notifier': >> zcache-main.c:(.text+0xb228d): undefined reference to `ramster_cpu_up' >> zcache-main.c:(.text+0xb2339): undefined reference to `ramster_cpu_down' drivers/built-in.o: In function `zcache_pampd_create': >> (.text+0xb26ce): undefined reference to `ramster_count_foreign_pages' drivers/built-in.o: In function `zcache_pampd_create': >> (.text+0xb27ef): undefined reference to `ramster_count_foreign_pages' drivers/built-in.o: In function `zcache_put_page': >> (.text+0xb299f): undefined reference to `ramster_do_preload_flnode' drivers/built-in.o: In function `zcache_flush_page': >> (.text+0xb2ea3): undefined reference to `ramster_do_preload_flnode' drivers/built-in.o: In function `zcache_flush_object': >> (.text+0xb307c): undefined reference to `ramster_do_preload_flnode' drivers/built-in.o: In function `zcache_init': >> zcache-main.c:(.text+0xb3629): undefined reference to `ramster_register_pamops' >> zcache-main.c:(.text+0xb3868): undefined reference to `ramster_init' >> drivers/built-in.o:(.rodata+0x15058): undefined reference to `ramster_foreign_eph_pages' >> drivers/built-in.o:(.rodata+0x15078): undefined reference to `ramster_foreign_pers_pages' Reported-by: Fengguang Wu <[email protected]> Signed-off-by: Bob Liu <[email protected]> Acked-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-05-20staging: ramster: add how-to documentDan Magenheimer1-0/+366
Add how-to documentation that provides a step-by-step guide for configuring and trying out a ramster cluster. Signed-off-by: Dan Magenheimer <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-05-16staging: zcache: Fix incorrect module_param_array typesGeert Uytterhoeven1-4/+4
drivers/staging/zcache/zcache-main.c: In function ‘__check_disable_cleancache’: drivers/staging/zcache/zcache-main.c:1928: warning: return from incompatible pointer type drivers/staging/zcache/zcache-main.c: In function ‘__check_disable_frontswap’: drivers/staging/zcache/zcache-main.c:1929: warning: return from incompatible pointer type drivers/staging/zcache/zcache-main.c: In function ‘__check_disable_frontswap_ignore_nonactive’: drivers/staging/zcache/zcache-main.c:1933: warning: return from incompatible pointer type Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-30staging: zcache: enable zcache to be built/loaded as a moduleDan Magenheimer5-12/+55
Allow zcache to be built/loaded as a module. Note runtime dependency disallows loading if cleancache/frontswap lazy initialization patches are not present. Zsmalloc support has not yet been merged into zcache but, once merged, could now easily be selected via a module_param. If built-in (not built as a module), the original mechanism of enabling via a kernel boot parameter is retained, but this should be considered deprecated. Note that module unload is explicitly not yet supported. Signed-off-by: Dan Magenheimer <[email protected]> [v1: Rebased with different order of patches] [v2: Removed [CLEANCACHE|FRONTSWAP]_HAS_LAZY_INIT ifdef] [v3: Rebased on top of ramster->zcache move] [v4: Redid the Makefile] [v5: s/ZCACHE2/ZCACHE/] Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Bob Liu <[email protected]> Cc: Wanpeng Li <[email protected]> Cc: Andor Daam <[email protected]> Cc: Florian Schmaus <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Stefan Hengelein <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-04-30staging: zcache: enable ramster to be built/loaded as a moduleDan Magenheimer7-13/+39
Enable module support for ramster. Note runtime dependency disallows loading if cleancache/frontswap lazy initialization patches are not present. If built-in (not built as a module), the original mechanism of enabling via a kernel boot parameter is retained, but this should be considered deprecated. Note that module unload is explicitly not yet supported. [v1: Fixed compile issues since ramster_init now has four arguments] [v2: Fixed rebase on ramster->zcache move] [[email protected]: use_frontswap_selfshrink cannot be __initdata] Signed-off-by: Dan Magenheimer <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Bob Liu <[email protected]> Cc: Wanpeng Li <[email protected]> Cc: Andor Daam <[email protected]> Cc: Florian Schmaus <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Stefan Hengelein <[email protected]> Cc: Wu Fengguang <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-04-30zcache/tmem: Better error checking on frontswap_register_ops return value.Konrad Rzeszutek Wilk1-1/+4
In the past it either used to be NULL or the "older" backend. Now we also return -Exx error codes. Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Bob Liu <[email protected]> Cc: Wanpeng Li <[email protected]> Cc: Andor Daam <[email protected]> Cc: Dan Magenheimer <[email protected]> Cc: Florian Schmaus <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Stefan Hengelein <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-04-30cleancache: Make cleancache_init use a pointer for the opsKonrad Rzeszutek Wilk1-4/+4
Instead of using a backend_registered to determine whether a backend is enabled. This allows us to remove the backend_register check and just do 'if (cleancache_ops)' [v1: Rebase on top of b97c4b430b0a (ramster->zcache move] Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Bob Liu <[email protected]> Cc: Wanpeng Li <[email protected]> Cc: Andor Daam <[email protected]> Cc: Dan Magenheimer <[email protected]> Cc: Florian Schmaus <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Stefan Hengelein <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-04-30frontswap: make frontswap_init use a pointer for the opsKonrad Rzeszutek Wilk1-4/+4
This simplifies the code in the frontswap - we can get rid of the 'backend_registered' test and instead check against frontswap_ops. [v1: Rebase on top of 703ba7fe5e0 (ramster->zcache move] Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Bob Liu <[email protected]> Cc: Wanpeng Li <[email protected]> Cc: Andor Daam <[email protected]> Cc: Dan Magenheimer <[email protected]> Cc: Florian Schmaus <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Stefan Hengelein <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-04-13staging: zcache/debug: fix coding styleWanpeng Li1-19/+76
Fix coding style issue: ERROR: space prohibited before that '++' (ctx:WxO) and line beyond 8 characters. Acked-by: Dan Magenheimer <[email protected]> Signed-off-by: Wanpeng Li <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-13staging: ramster/debug: Add CONFIG_RAMSTER_DEBUG Kconfig entryWanpeng Li3-2/+10
Add CONFIG_RAMSTER_DEBUG Kconfig entry. Acked-by: Dan Magenheimer <[email protected]> Signed-off-by: Wanpeng Li <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-13staging: ramster: Add incremental accessory countersWanpeng Li2-16/+83
Add incremental accessory counters that are going to be used for debug fs entries. Acked-by: Dan Magenheimer <[email protected]> Signed-off-by: Wanpeng Li <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-13staging: ramster/debug: Use an array to initialize/use debugfs attributesWanpeng Li1-36/+32
Use an array to initialize/use debugfs attributes, it makes them neater as zcache/debug.c does. Acked-by: Dan Magenheimer <[email protected]> Signed-off-by: Wanpeng Li <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-13staging: ramster: Move debugfs code out of ramster.c fileWanpeng Li4-110/+154
Note that at this point there is no CONFIG_RAMSTER_DEBUG option in the Kconfig. So in effect all of the counters are nop until that option gets introduced in patch: ramster/debug: Add CONFIG_RAMSTER_DEBUG Kconfig entry Acked-by: Dan Magenheimer <[email protected]> Signed-off-by: Wanpeng Li <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-12staging: ramster: decrease foregin pers pages when count < 0Wanpeng Li1-0/+1
commit 9a5c59687ad ("staging: ramster: Provide accessory functions for counter decrease") forget decrease foregin pers pages, this patch fix it. Acked-by: Dan Magenheimer <[email protected]> Signed-off-by: Wanpeng Li <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-11staging: ramster: Provide accessory functions for counter decreaseWanpeng Li1-13/+19
This patch enables these functions to be wrapped and can disable/enable this with CONFIG_DEBUG_FS. Signed-off-by: Wanpeng Li <[email protected]> Acked-by: Dan Magenheimer <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-11staging: ramster: Provide accessory functions for counter increaseWanpeng Li1-11/+23
This patch enables these functions to be wrapped and can disable/enable this with CONFIG_DEBUG_FS. Signed-off-by: Wanpeng Li <[email protected]> Acked-by: Dan Magenheimer <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-11staging: zcache: fix account foregin counters against zero-filled pagesWanpeng Li1-4/+4
zero-filled pages won't be compressed and sent to remote system. Monitor the number ephemeral and persistent pages that Ramster has sent make no sense. This patch skip account foregin counters against zero-filled pages. Signed-off-by: Wanpeng Li <[email protected]> Acked-by: Dan Magenheimer <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-03staging: zcache: clean TODO listWanpeng Li1-2/+1
Cleanup TODO list since support zero-filled pages more efficiently has already done by this patchset. Acked-by: Dan Magenheimer <[email protected]> Signed-off-by: Wanpeng Li <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-03staging: zcache: introduce zero-filled page stat countWanpeng Li3-0/+24
Introduce zero-filled page statistics to monitor the number of zero-filled pages. Acked-by: Dan Magenheimer <[email protected]> Signed-off-by: Wanpeng Li <[email protected]> Reviewed-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-03staging: zcache: fix static variables defined in debug.h but used in mutiple ↵Wanpeng Li2-31/+63
C files After commit 95bdaee214 ("zcache: Move debugfs code out of zcache-main.c file") be merged, most of knods in zcache debugfs just export zero since these variables are defined in debug.h but are in use in multiple C files zcache-main.c and debug.c, in this case variables can't be treated as shared variables. Signed-off-by: Wanpeng Li <[email protected]> Reviewed-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-02staging: zcache: fix zcache writeback in debugfsWanpeng Li1-2/+2
commit 9c0ad59ef ("zcache/debug: Use an array to initialize/use debugfs attributes") use an array to initialize/use debugfs attributes, .name = #x, .val = &zcache_##x. For zcache writeback, this commit set .name = zcache_outstanding_writeback_pages and .name = zcache_writtenback_pages seperately, however, corresponding .val = &zcache_zcache_outstanding_writeback_pages and .val = &zcache_zcache_writtenback_pages, which are not correct. Signed-off-by: Wanpeng Li <[email protected]> Reviewed-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-02staging: zcache: fix pers_pageframes|_max aren't exported in debugfsWanpeng Li1-0/+1
Before commit 9c0ad59ef ("zcache/debug: Use an array to initialize/use debugfs attributes"), pers_pageframes|_max are exported in debugfs, but this commit forgot use array export pers_pageframes|_max. This patch add pers_pageframes|_max back. Signed-off-by: Wanpeng Li <[email protected]> Reviewed-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-02staging: zcache: handle zcache_[eph|pers]_zpages for zero-filled pageWanpeng Li1-1/+6
Increment/decrement zcache_[eph|pers]_zpages for zero-filled pages, the main point of the counters for zpages and pageframes is to be able to calculate density == zpages/pageframes. A zero-filled page becomes a zpage that "compresses" to zero bytes and, as a result, requires zero pageframes for storage. So the zpages counter should be increased but the pageframes counter should not. [Dan Magenheimer <[email protected]>: patch description] Acked-by: Dan Magenheimer <[email protected]> Reviewed-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Wanpeng Li <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-02staging: zcache: zero-filled pages awarenessWanpeng Li1-13/+70
Compression of zero-filled pages can unneccessarily cause internal fragmentation, and thus waste memory. This special case can be optimized. This patch captures zero-filled pages, and marks their corresponding zcache backing page entry as zero-filled. Whenever such zero-filled page is retrieved, we fill the page frame with zero. Acked-by: Dan Magenheimer <[email protected]> Reviewed-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Wanpeng Li <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-02staging: zcache: introduce zero-filled pages handlerWanpeng Li1-0/+27
Introduce zero-filled pages handler to capture and handle zero pages. Acked-by: Dan Magenheimer <[email protected]> Signed-off-by: Wanpeng Li <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-02drivers: staging: zcache: fix compile warningBob Liu1-1/+1
Fix below compile warning: staging/zcache/zcache-main.c: In function ‘zcache_autocreate_pool’: staging/zcache/zcache-main.c:1393:13: warning: ‘cli’ may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Bob Liu <[email protected]> Reviewed-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-02drivers: staging: zcache: fix compile errorBob Liu3-4/+10
Because 'ramster_debugfs_init' is not defined if !CONFIG_DEBUG_FS, there is compile error: $ make drivers/staging/zcache/ staging/zcache/ramster/ramster.c: In function ‘ramster_init’: staging/zcache/ramster/ramster.c:981:2: error: implicit declaration of function ‘ramster_debugfs_init’ [-Werror=implicit-function-declaration] This patch fix it and reduce some #ifdef CONFIG_DEBUG_FS in .c files the same way. Reported-by: Fengguang Wu <[email protected]> Signed-off-by: Bob Liu <[email protected]> Reviewed-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-01Merge 3.9-rc5 into staging-nextGreg Kroah-Hartman1-1/+1
This pulls in all of the good fixes we need here. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-26drivers/staging/zcache/zcache-main.c: fix buildAndrew Morton1-26/+0
flush_dcache_page() takes a page*, not a void*. It breaks ia64. Remove this and another unused function. Warnings remain: drivers/staging/zcache/zcache-main.c: In function '__check_disable_cleancache': drivers/staging/zcache/zcache-main.c:1837: warning: return from incompatible pointer type drivers/staging/zcache/zcache-main.c: In function '__check_disable_frontswap': drivers/staging/zcache/zcache-main.c:1838: warning: return from incompatible pointer type drivers/staging/zcache/zcache-main.c: In function '__check_disable_frontswap_ignore_nonactive': drivers/staging/zcache/zcache-main.c:1842: warning: return from incompatible pointer type Cc: Dan Magenheimer <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-18staging: zcache: introduce zero filled pages handlerWanpeng Li1-0/+26
Introduce zero-filled pages handler to capture and handle zero pages. Acked-by: Dan Magenheimer <[email protected]> Signed-off-by: Wanpeng Li <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-18zcache/TODO: Update on two items.Konrad Rzeszutek Wilk1-5/+1
Two of them (zcache DebugFS cleanup) and the module loading capability are now in linux-next for v3.10. Also Bob Liu is full-time going to help on knocking these items off the list. CC: [email protected] Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-18staging: zcache: fix typo "64_BIT"Paul Bolle1-1/+1
Signed-off-by: Paul Bolle <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-18Merge 3.9-rc3 into staging-nextGreg Kroah-Hartman1-15/+10
This resolves the merge error due to removing the ccg staging driver, and picks up the other staging driver fixes that went into 3.9-rc3. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-13zcache: convert to idr_alloc()Tejun Heo1-15/+10
idr_get_new*() and friends are about to be deprecated. Convert to the new idr_alloc() interface. Only compile tested. Signed-off-by: Tejun Heo <[email protected]> Cc: Dan Magenheimer <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-03-11staging: zcache: using strlcpy instead of strncpyChen Gang1-1/+2
for NUL terminated string, need alway set '\0' in the end. Signed-off-by: Chen Gang <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-08staging: zcache/debug: compiler failure on PPC64 and revert commit.Konrad Rzeszutek Wilk2-1/+2
On PPC64 we get this: In file included from drivers/staging/zcache/debug.c:2: drivers/staging/zcache/debug.h: In function 'dec_zcache_obj_count': drivers/staging/zcache/debug.h:16: error: implicit declaration of function 'BUG_ON' This simple patch adds the appropiate header file to finish the compile and reverts "staging: zcache: disable ZCACHE_DEBUG due to build error" (5db5a20a50cfd078c78b13a988f237cca81aedc5) Reported-by: Stephen Rothwell <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-06staging: zcache: disable ZCACHE_DEBUG due to build errorStephen Rothwell1-0/+1
In file included from drivers/staging/zcache/debug.c:2:0: drivers/staging/zcache/debug.h: In function 'dec_zcache_obj_count': drivers/staging/zcache/debug.h:16:2: error: implicit declaration of function 'BUG_ON' [-Werror=implicit-function-declaration] Signed-off-by: Stephen Rothwell <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-05zcache/debug: Coalesce all debug under CONFIG_ZCACHE_DEBUGKonrad Rzeszutek Wilk3-4/+12
and also define this extra attribute in the Kconfig entry. Acked-by: Dan Magenheimer <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-05zcache: Module license is defined twice.Konrad Rzeszutek Wilk1-2/+0
The other (same license) is at the end of the file. Acked-by: Dan Magenheimer <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-05zcache: Move the last of the debugfs counters outKonrad Rzeszutek Wilk2-66/+89
We now have in zcache-main only the counters that are are not debugfs related. Acked-by: Dan Magenheimer <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-05zcache/debug: Use an array to initialize/use debugfs attributes.Konrad Rzeszutek Wilk1-112/+51
It makes it neater and also allows us to piggyback on that in the zcache_dump function. Acked-by: Dan Magenheimer <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-05zcache: Move debugfs code out of zcache-main.c file.Konrad Rzeszutek Wilk4-256/+328
Note that at this point there is no CONFIG_ZCACHE_DEBUG option in the Kconfig. So in effect all of the counters are nop until that option gets re-introduced in: zcache/debug: Coalesce all debug under CONFIG_ZCACHE_DEBUG Acked-by: Dan Magenheimer <[email protected]> [v1: Fixed conflicts due to rebase] Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-05zcache: Make the debug code use pr_debugKonrad Rzeszutek Wilk1-44/+41
as if you are debugging this driver you would be using 'debug' on the command line anyhow - and this would dump the debug data on the proper loglevel. While at it also remove the unconditional #define ZCACHE_DEBUG. Acked-by: Dan Magenheimer <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-05zcache: The last of the atomic reads has now an accessory function.Konrad Rzeszutek Wilk1-4/+9
And now we can move the code ([inc|dec]_zcache_[*]) to their own file with a header to make them nops or feed in debugfs. Acked-by: Dan Magenheimer <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-05zcache: Provide accessory functions for counter decrease.Konrad Rzeszutek Wilk1-39/+57
This way we can have all wrapped with these functions and can disable/enable this with CONFIG_DEBUG_FS. Acked-by: Dan Magenheimer <[email protected]> [v2: Rebase on top of staging/zcache: Fix/improve zcache writeback code, tie to a config option] [v3: Rebase on top of zcache: Fix compile warnings due to usage of debugfs_create_size_t] Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-05zcache: Provide accessory functions for counter increaseKonrad Rzeszutek Wilk1-36/+73
This is the first step in moving the debugfs code out of the main file in-to another file. And also allow the code to run without CONFIG_DEBUG_FS defined. Acked-by: Dan Magenheimer <[email protected]> [v2: Rebase on top staging/zcache: Fix/improve zcache writeback code, tie to a config option] [v3: Rebase on top of zcache: Fix compile warnings due to usage of debugfs_create_size_t] Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>