Home
last modified time | relevance | path

Searched refs:workspace (Results 1 – 25 of 48) sorted by relevance

12

/linux/fs/btrfs/
H A Dzlib.c29 struct workspace { struct
42 struct workspace *workspace = list_entry(ws, struct workspace, list); in zlib_get_workspace() argument
44 workspace->level = level; in zlib_get_workspace()
51 struct workspace *workspace = list_entry(ws, struct workspace, list); in zlib_free_workspace() local
53 kvfree(workspace->strm.workspace); in zlib_free_workspace()
54 kfree(workspace->buf); in zlib_free_workspace()
55 kfree(workspace); in zlib_free_workspace()
60 struct workspace *workspace; in zlib_alloc_workspace() local
63 workspace = kzalloc(sizeof(*workspace), GFP_KERNEL); in zlib_alloc_workspace()
64 if (!workspace) in zlib_alloc_workspace()
[all …]
H A Dzstd.c44 struct workspace { struct
91 static inline struct workspace *list_to_workspace(struct list_head *list) in list_to_workspace()
93 return container_of(list, struct workspace, list); in list_to_workspace()
122 struct workspace *victim = container_of(pos, struct workspace, in zstd_reclaim_timer_fn()
204 struct workspace *workspace; in zstd_cleanup_workspace_manager() local
210 workspace = container_of(wsm.idle_ws[i].next, in zstd_cleanup_workspace_manager()
211 struct workspace, list); in zstd_cleanup_workspace_manager()
212 list_del(&workspace->list); in zstd_cleanup_workspace_manager()
213 list_del(&workspace->lru_list); in zstd_cleanup_workspace_manager()
214 zstd_free_workspace(&workspace->list); in zstd_cleanup_workspace_manager()
[all …]
H A Dlzo.c64 struct workspace { struct
75 struct workspace *workspace = list_entry(ws, struct workspace, list); in lzo_free_workspace() argument
77 kvfree(workspace->buf); in lzo_free_workspace()
78 kvfree(workspace->cbuf); in lzo_free_workspace()
79 kvfree(workspace->mem); in lzo_free_workspace()
80 kfree(workspace); in lzo_free_workspace()
85 struct workspace *workspace; in lzo_alloc_workspace() local
87 workspace = kzalloc(sizeof(*workspace), GFP_KERNEL); in lzo_alloc_workspace()
88 if (!workspace) in lzo_alloc_workspace()
91 workspace->mem = kvmalloc(LZO1X_MEM_COMPRESS, GFP_KERNEL | __GFP_NOWARN); in lzo_alloc_workspace()
[all …]
H A Dcompression.c695 struct heuristic_ws *workspace; in free_heuristic_ws() local
697 workspace = list_entry(ws, struct heuristic_ws, list); in free_heuristic_ws()
699 kvfree(workspace->sample); in free_heuristic_ws()
700 kfree(workspace->bucket); in free_heuristic_ws()
701 kfree(workspace->bucket_b); in free_heuristic_ws()
702 kfree(workspace); in free_heuristic_ws()
779 struct list_head *workspace; in btrfs_init_workspace_manager() local
791 workspace = alloc_workspace(type, 0); in btrfs_init_workspace_manager()
792 if (IS_ERR(workspace)) { in btrfs_init_workspace_manager()
798 list_add(workspace, &wsm->idle_ws); in btrfs_init_workspace_manager()
[all …]
/linux/drivers/block/zram/
H A Dbackend_deflate.c38 if (zctx->cctx.workspace) { in deflate_destroy()
40 vfree(zctx->cctx.workspace); in deflate_destroy()
42 if (zctx->dctx.workspace) { in deflate_destroy()
44 vfree(zctx->dctx.workspace); in deflate_destroy()
61 zctx->cctx.workspace = vzalloc(sz); in deflate_create()
62 if (!zctx->cctx.workspace) in deflate_create()
72 zctx->dctx.workspace = vzalloc(sz); in deflate_create()
73 if (!zctx->dctx.workspace) in deflate_create()
/linux/lib/zstd/
H A Dzstd_decompress_module.c74 zstd_dctx *zstd_init_dctx(void *workspace, size_t workspace_size) in zstd_init_dctx() argument
76 if (workspace == NULL) in zstd_init_dctx()
78 return ZSTD_initStaticDCtx(workspace, workspace_size); in zstd_init_dctx()
104 zstd_dstream *zstd_init_dstream(size_t max_window_size, void *workspace, in zstd_init_dstream() argument
107 if (workspace == NULL) in zstd_init_dstream()
110 return ZSTD_initStaticDStream(workspace, workspace_size); in zstd_init_dstream()
H A Dzstd_compress_module.c101 zstd_cctx *zstd_init_cctx(void *workspace, size_t workspace_size) in zstd_init_cctx() argument
103 if (workspace == NULL) in zstd_init_cctx()
105 return ZSTD_initStaticCCtx(workspace, workspace_size); in zstd_init_cctx()
160 unsigned long long pledged_src_size, void *workspace, size_t workspace_size) in zstd_init_cstream() argument
164 if (workspace == NULL) in zstd_init_cstream()
167 cstream = ZSTD_initStaticCStream(workspace, workspace_size); in zstd_init_cstream()
/linux/fs/jffs2/
H A Dcompr_zlib.c45 def_strm.workspace = vmalloc(zlib_deflate_workspacesize(MAX_WBITS, in alloc_workspaces()
47 if (!def_strm.workspace) in alloc_workspaces()
52 inf_strm.workspace = vmalloc(zlib_inflate_workspacesize()); in alloc_workspaces()
53 if (!inf_strm.workspace) { in alloc_workspaces()
54 vfree(def_strm.workspace); in alloc_workspaces()
64 vfree(def_strm.workspace); in free_workspaces()
65 vfree(inf_strm.workspace); in free_workspaces()
/linux/fs/bcachefs/
H A Dcompress.c145 static inline void zlib_set_workspace(z_stream *strm, void *workspace) in zlib_set_workspace() argument
148 strm->workspace = workspace; in zlib_set_workspace()
158 void *workspace; in __bio_uncompress() local
179 workspace = mempool_alloc(&c->decompress_workspace, GFP_NOFS); in __bio_uncompress()
181 zlib_set_workspace(&strm, workspace); in __bio_uncompress()
185 mempool_free(workspace, &c->decompress_workspace); in __bio_uncompress()
198 workspace = mempool_alloc(&c->decompress_workspace, GFP_NOFS); in __bio_uncompress()
199 ctx = zstd_init_dctx(workspace, zstd_dctx_workspace_bound()); in __bio_uncompress()
205 mempool_free(workspace, &c->decompress_workspace); in __bio_uncompress()
296 void *workspace, in attempt_compress() argument
[all …]
/linux/crypto/
H A Ddeflate.c47 stream->workspace = vzalloc(zlib_deflate_workspacesize( in deflate_comp_init()
49 if (!stream->workspace) { in deflate_comp_init()
63 vfree(stream->workspace); in deflate_comp_init()
72 stream->workspace = vzalloc(zlib_inflate_workspacesize()); in deflate_decomp_init()
73 if (!stream->workspace) { in deflate_decomp_init()
85 vfree(stream->workspace); in deflate_decomp_init()
92 vfree(ctx->comp_stream.workspace); in deflate_comp_exit()
98 vfree(ctx->decomp_stream.workspace); in deflate_decomp_exit()
/linux/lib/zstd/compress/
H A Dzstd_compress_superblock.c305 void* workspace, size_t wkspSize, in ZSTD_estimateSubBlockSize_literal() argument
308 unsigned* const countWksp = (unsigned*)workspace; in ZSTD_estimateSubBlockSize_literal()
315 … HIST_count_wksp (countWksp, &maxSymbolValue, (const BYTE*)literals, litSize, workspace, wkspSize); in ZSTD_estimateSubBlockSize_literal()
330 void* workspace, size_t wkspSize) in ZSTD_estimateSubBlockSize_symbolType() argument
332 unsigned* const countWksp = (unsigned*)workspace; in ZSTD_estimateSubBlockSize_symbolType()
339 HIST_countFast_wksp(countWksp, &max, codeTable, nbSeq, workspace, wkspSize); /* can't fail */ in ZSTD_estimateSubBlockSize_symbolType()
366 void* workspace, size_t wkspSize, in ZSTD_estimateSubBlockSize_sequences() argument
375 workspace, wkspSize); in ZSTD_estimateSubBlockSize_sequences()
379 workspace, wkspSize); in ZSTD_estimateSubBlockSize_sequences()
383 workspace, wkspSize); in ZSTD_estimateSubBlockSize_sequences()
[all …]
H A Dzstd_cwksp.h143 void* workspace; member
165 assert(ws->workspace <= ws->objectEnd); in ZSTD_cwksp_assert_internal_consistency()
317 return (ptr != NULL) && (ws->workspace <= ptr) && (ptr <= ws->workspaceEnd); in ZSTD_cwksp_owns_buffer()
497 ws->workspace = start; in ZSTD_cwksp_init()
499 ws->objectEnd = ws->workspace; in ZSTD_cwksp_init()
509 void* workspace = ZSTD_customMalloc(size, customMem); in ZSTD_cwksp_create() local
511 RETURN_ERROR_IF(workspace == NULL, memory_allocation, "NULL pointer!"); in ZSTD_cwksp_create()
512 ZSTD_cwksp_init(ws, workspace, size, ZSTD_cwksp_dynamic_alloc); in ZSTD_cwksp_create()
517 void *ptr = ws->workspace; in ZSTD_cwksp_free()
533 return (size_t)((BYTE*)ws->workspaceEnd - (BYTE*)ws->workspace); in ZSTD_cwksp_sizeof()
[all …]
H A Dzstd_compress.c77 ZSTD_cwksp workspace; member
118 ZSTD_CCtx* ZSTD_initStaticCCtx(void* workspace, size_t workspaceSize) in ZSTD_initStaticCCtx() argument
123 if ((size_t)workspace & 7) return NULL; /* must be 8-aligned */ in ZSTD_initStaticCCtx()
124 ZSTD_cwksp_init(&ws, workspace, workspaceSize, ZSTD_cwksp_static_alloc); in ZSTD_initStaticCCtx()
130 ZSTD_cwksp_move(&cctx->workspace, &ws); in ZSTD_initStaticCCtx()
134 …if (!ZSTD_cwksp_check_available(&cctx->workspace, ENTROPY_WORKSPACE_SIZE + 2 * sizeof(ZSTD_compres… in ZSTD_initStaticCCtx()
135 …CBlock = (ZSTD_compressedBlockState_t*)ZSTD_cwksp_reserve_object(&cctx->workspace, sizeof(ZSTD_com… in ZSTD_initStaticCCtx()
136 …CBlock = (ZSTD_compressedBlockState_t*)ZSTD_cwksp_reserve_object(&cctx->workspace, sizeof(ZSTD_com… in ZSTD_initStaticCCtx()
137 …cctx->entropyWorkspace = (U32*)ZSTD_cwksp_reserve_object(&cctx->workspace, ENTROPY_WORKSPACE_SIZE); in ZSTD_initStaticCCtx()
166 ZSTD_cwksp_free(&cctx->workspace, cctx->customMem); in ZSTD_freeCCtxContent()
[all …]
/linux/fs/pstore/
H A Dplatform.c181 .workspace = compress_workspace, in pstore_compress()
587 char *unzipped, *workspace; in decompress_record() local
600 if (!zstream->workspace) { in decompress_record()
613 workspace = kvzalloc(max_uncompressed_size + record->ecc_notice_size, in decompress_record()
615 if (!workspace) in decompress_record()
620 zstream->next_out = workspace; in decompress_record()
626 kvfree(workspace); in decompress_record()
633 memcpy(workspace + unzipped_len, record->buf + record->size, in decompress_record()
637 unzipped = kvmemdup(workspace, unzipped_len + record->ecc_notice_size, in decompress_record()
639 kvfree(workspace); in decompress_record()
[all …]
/linux/lib/zlib_inflate/
H A Dinfutil.c20 strm->workspace = kmalloc(zlib_inflate_workspacesize(), GFP_KERNEL); in zlib_inflate_blob()
21 if (strm->workspace == NULL) in zlib_inflate_blob()
44 kfree(strm->workspace); in zlib_inflate_blob()
/linux/fs/cramfs/
H A Duncompress.c62 stream.workspace = vmalloc(zlib_inflate_workspacesize()); in cramfs_uncompress_init()
63 if (!stream.workspace) { in cramfs_uncompress_init()
78 vfree(stream.workspace); in cramfs_uncompress_exit()
/linux/fs/squashfs/
H A Dzstd_wrapper.c23 struct workspace { struct
31 struct workspace *wksp = kmalloc(sizeof(*wksp), GFP_KERNEL); in zstd_init() argument
53 struct workspace *wksp = strm; in zstd_free()
65 struct workspace *wksp = strm; in zstd_uncompress()
H A Dzlib_wrapper.c29 stream->workspace = vmalloc(zlib_inflate_workspacesize()); in zlib_init()
30 if (stream->workspace == NULL) in zlib_init()
47 vfree(stream->workspace); in zlib_free()
/linux/include/linux/
H A Dzstd.h202 zstd_cctx *zstd_init_cctx(void *workspace, size_t workspace_size);
306 zstd_dctx *zstd_init_dctx(void *workspace, size_t workspace_size);
443 unsigned long long pledged_src_size, void *workspace, size_t workspace_size);
533 zstd_dstream *zstd_init_dstream(size_t max_window_size, void *workspace,
/linux/lib/
H A Ddecompress_inflate.c82 strm->workspace = malloc(flush ? zlib_inflate_workspacesize() : in __gunzip()
89 if (strm->workspace == NULL) { in __gunzip()
186 free(strm->workspace); in __gunzip()
/linux/drivers/net/ppp/
H A Dppp_deflate.c66 vfree(state->strm.workspace); in z_comp_free()
107 state->strm.workspace = vmalloc(zlib_deflate_workspacesize(-w_size, 8)); in z_comp_alloc()
108 if (state->strm.workspace == NULL) in z_comp_alloc()
282 vfree(state->strm.workspace); in z_decomp_free()
322 state->strm.workspace = vmalloc(zlib_inflate_workspacesize()); in z_decomp_alloc()
323 if (state->strm.workspace == NULL) in z_decomp_alloc()
/linux/drivers/net/ethernet/chelsio/cxgb4/
H A Dcudbg_zlib.c45 compress_stream.workspace = pdbg_init->workspace; in cudbg_compress_buff()
/linux/fs/erofs/
H A Ddecompressor_deflate.c36 vfree(strm->z.workspace); in z_erofs_deflate_exit()
78 strm->z.workspace = vmalloc(zlib_inflate_workspacesize()); in z_erofs_load_deflate_config()
79 if (!strm->z.workspace) { in z_erofs_load_deflate_config()
/linux/lib/zstd/decompress/
H A Dzstd_decompress_internal.h85 U32 workspace[ZSTD_BUILD_FSE_TABLE_WKSP_SIZE_U32]; member
132 …U32 workspace[HUF_DECOMPRESS_WORKSPACE_SIZE_U32]; /* space needed when building huffman tables */ member
/linux/kernel/module/
H A Ddecompress.c103 s.workspace = kvmalloc(zlib_inflate_workspacesize(), GFP_KERNEL); in module_gzip_decompress()
104 if (!s.workspace) in module_gzip_decompress()
141 kvfree(s.workspace); in module_gzip_decompress()

12