1 #ifndef _RELAY_RESIZE_H
2 #define _RELAY_RESIZE_H
5 * If the channel usage has been below the low water mark for more than
6 * this amount of time, we can shrink the buffer if necessary.
8 #define SHRINK_TIMER_SECS 60
10 /* This inspired by rtai/shmem */
11 #define FIX_SIZE(x) (((x) - 1) & PAGE_MASK) + PAGE_SIZE
13 /* Don't attempt resizing again after this many failures */
14 #define MAX_RESIZE_FAILURES 1
16 /* Trigger resizing if a resizable channel is this full */
17 #define RESIZE_THRESHOLD 3 / 4
20 * Used for deferring resized channel free
32 struct work_struct work; /* resize de-allocation work struct */
36 alloc_rchan_buf(unsigned long size,
37 struct page ***page_array,
41 free_rchan_buf(void *buf,
42 struct page **page_array,
46 expand_check(struct rchan *rchan);
49 init_shrink_timer(struct rchan *rchan);
51 #endif/* _RELAY_RESIZE_H */