Remove percpu comment
This commit is contained in:
parent
309bb2d5ef
commit
92fc5158e2
|
@ -45,34 +45,6 @@ struct lbd {
|
|||
u32 c_len;
|
||||
};
|
||||
|
||||
/*
|
||||
* Allocating lz4_wrkmem percpu:
|
||||
*
|
||||
* If the alloc is per-instance, it would need to be allocated in compress.c
|
||||
* and passed around. The easiest way to pass it around is likely to make it
|
||||
* part of a struct. We can't use struct compress because that is private.
|
||||
* So we would need to create a struct (say, compress_percpu).
|
||||
*
|
||||
* If the alloc is global, we can just declare it file-local. But it would
|
||||
* need to be the largest possible size. Which means we probably don't want
|
||||
* to use alloc_percpu_gfp() directly, because 1mb chunks are probably not
|
||||
* that common. So suppose we allocate a percpu vector of page ptrs.
|
||||
*
|
||||
* #define COMPRESS_MAX_INPUT_SIZE (1 << LBLK_SHIFT_MAX)
|
||||
* #define COMPRESS_LZ4_BOUND LZ4_COMPRESSBOUND(COMPRESS_MAX_INPUT_SIZE)
|
||||
* #define WRKMEM_PAGES DIV_ROUND_UP(COMPRESS_LZ4_BOUND, PAGE_SIZE)
|
||||
* typedef struct page*[WRKMEM_PAGES] lz4_wrkmem_pagev_t;
|
||||
*
|
||||
* g_lz4_wrkmem = alloc_percpu_gfp(lz4_wrkmem_pagev_t, GFP_IO);
|
||||
*
|
||||
* That's not bad at all. But how do we alloc (and free) the actual pages?
|
||||
*
|
||||
* pagev = get_cpu_var(g_lz4_wrkmem);
|
||||
* put_cpu_var(pagev);
|
||||
*
|
||||
* free_percpu(g_lz4_wrkmem);
|
||||
*/
|
||||
|
||||
static inline bool
|
||||
lblk_is_zeros(struct cbd_params* params, struct lbd* lbd)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue