Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/swap_pager.h
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | struct swdevt { | ||||
int sw_nblks; | int sw_nblks; | ||||
int sw_used; | int sw_used; | ||||
dev_t sw_dev; | dev_t sw_dev; | ||||
struct vnode *sw_vp; | struct vnode *sw_vp; | ||||
void *sw_id; | void *sw_id; | ||||
swblk_t sw_first; | swblk_t sw_first; | ||||
swblk_t sw_end; | swblk_t sw_end; | ||||
struct blist *sw_blist; | struct blist *sw_blist; | ||||
daddr_t sw_cursor; /* next-fit search starts at */ | |||||
daddr_t sw_trimmer; /* where to look for free space to trim */ | |||||
TAILQ_ENTRY(swdevt) sw_list; | TAILQ_ENTRY(swdevt) sw_list; | ||||
sw_strategy_t *sw_strategy; | sw_strategy_t *sw_strategy; | ||||
sw_close_t *sw_close; | sw_close_t *sw_close; | ||||
}; | }; | ||||
#define SW_UNMAPPED 0x01 | #define SW_UNMAPPED 0x01 | ||||
#define SW_CLOSING 0x04 | #define SW_CLOSING 0x04 | ||||
alc: Mark, should we introduce a SW_TRIM flag here that will be set by a new syscall? | |||||
Not Done Inline ActionsYes, I think so. The features I'd like to see added are TRIM support, and support for prioritized swap devices. I imagined modifying the system call to look like this: swapon(const char *device, int flags, int priority). We'd be able to request TRIM support by setting a flag. markj: Yes, I think so. The features I'd like to see added are TRIM support, and support for… | |||||
Not Done Inline ActionsShould we be modifying the existing syscall or adding a new one? alc: Should we be modifying the existing syscall or adding a new one? | |||||
Not Done Inline ActionsI think we should add a new one and rename the old one to freebsd12_swapon. libc.so provides a swapon@@FBSD_1.0 symbol; it should be straightforward to implement compatibility for old applications. markj: I think we should add a new one and rename the old one to freebsd12_swapon. libc.so provides a… | |||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
extern int swap_pager_avail; | extern int swap_pager_avail; | ||||
struct xswdev; | struct xswdev; | ||||
int swap_dev_info(int name, struct xswdev *xs, char *devname, size_t len); | int swap_dev_info(int name, struct xswdev *xs, char *devname, size_t len); | ||||
void swap_pager_copy(vm_object_t, vm_object_t, vm_pindex_t, int); | void swap_pager_copy(vm_object_t, vm_object_t, vm_pindex_t, int); | ||||
Show All 10 Lines |
Mark, should we introduce a SW_TRIM flag here that will be set by a new syscall?