X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=block%2Fblk-cgroup.h;h=2b866ec1dcea668ffad0ba4c3499987cc75d0e6b;hb=327723edebbbd621ed35b0d63073685eb225563e;hp=3c27bdfc97b94f77d169d59c22ba6d2b2fe312e0;hpb=34d0f179d6dd711d3fc13c0820a456c59aae8048;p=pandora-kernel.git diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h index 3c27bdfc97b9..2b866ec1dcea 100644 --- a/block/blk-cgroup.h +++ b/block/blk-cgroup.h @@ -108,10 +108,8 @@ struct blkio_group { void *key; struct hlist_node blkcg_node; unsigned short blkcg_id; -#ifdef CONFIG_DEBUG_BLK_CGROUP /* Store cgroup path */ char path[128]; -#endif /* The device MKDEV(major, minor), this group has been created for */ dev_t dev; @@ -147,6 +145,11 @@ struct blkio_policy_type { extern void blkio_policy_register(struct blkio_policy_type *); extern void blkio_policy_unregister(struct blkio_policy_type *); +static inline char *blkg_path(struct blkio_group *blkg) +{ + return blkg->path; +} + #else struct blkio_group { @@ -158,6 +161,8 @@ struct blkio_policy_type { static inline void blkio_policy_register(struct blkio_policy_type *blkiop) { } static inline void blkio_policy_unregister(struct blkio_policy_type *blkiop) { } +static inline char *blkg_path(struct blkio_group *blkg) { return NULL; } + #endif #define BLKIO_WEIGHT_MIN 100 @@ -165,16 +170,12 @@ static inline void blkio_policy_unregister(struct blkio_policy_type *blkiop) { } #define BLKIO_WEIGHT_DEFAULT 500 #ifdef CONFIG_DEBUG_BLK_CGROUP -static inline char *blkg_path(struct blkio_group *blkg) -{ - return blkg->path; -} -void blkiocg_update_set_active_queue_stats(struct blkio_group *blkg); +void blkiocg_update_avg_queue_size_stats(struct blkio_group *blkg); void blkiocg_update_dequeue_stats(struct blkio_group *blkg, unsigned long dequeue); void blkiocg_update_set_idle_time_stats(struct blkio_group *blkg); void blkiocg_update_idle_time_stats(struct blkio_group *blkg); -void blkiocg_set_start_empty_time(struct blkio_group *blkg, bool ignore); +void blkiocg_set_start_empty_time(struct blkio_group *blkg); #define BLKG_FLAG_FNS(name) \ static inline void blkio_mark_blkg_##name( \ @@ -197,16 +198,14 @@ BLKG_FLAG_FNS(idling) BLKG_FLAG_FNS(empty) #undef BLKG_FLAG_FNS #else -static inline char *blkg_path(struct blkio_group *blkg) { return NULL; } -static inline void blkiocg_update_set_active_queue_stats( +static inline void blkiocg_update_avg_queue_size_stats( struct blkio_group *blkg) {} static inline void blkiocg_update_dequeue_stats(struct blkio_group *blkg, unsigned long dequeue) {} static inline void blkiocg_update_set_idle_time_stats(struct blkio_group *blkg) {} static inline void blkiocg_update_idle_time_stats(struct blkio_group *blkg) {} -static inline void blkiocg_set_start_empty_time(struct blkio_group *blkg, - bool ignore) {} +static inline void blkiocg_set_start_empty_time(struct blkio_group *blkg) {} #endif #if defined(CONFIG_BLK_CGROUP) || defined(CONFIG_BLK_CGROUP_MODULE) @@ -217,7 +216,6 @@ extern void blkiocg_add_blkio_group(struct blkio_cgroup *blkcg, extern int blkiocg_del_blkio_group(struct blkio_group *blkg); extern struct blkio_group *blkiocg_lookup_group(struct blkio_cgroup *blkcg, void *key); -void blkio_group_init(struct blkio_group *blkg); void blkiocg_update_timeslice_used(struct blkio_group *blkg, unsigned long time); void blkiocg_update_dispatch_stats(struct blkio_group *blkg, uint64_t bytes, @@ -226,16 +224,15 @@ void blkiocg_update_completion_stats(struct blkio_group *blkg, uint64_t start_time, uint64_t io_start_time, bool direction, bool sync); void blkiocg_update_io_merged_stats(struct blkio_group *blkg, bool direction, bool sync); -void blkiocg_update_request_add_stats(struct blkio_group *blkg, +void blkiocg_update_io_add_stats(struct blkio_group *blkg, struct blkio_group *curr_blkg, bool direction, bool sync); -void blkiocg_update_request_remove_stats(struct blkio_group *blkg, +void blkiocg_update_io_remove_stats(struct blkio_group *blkg, bool direction, bool sync); #else struct cgroup; static inline struct blkio_cgroup * cgroup_to_blkio_cgroup(struct cgroup *cgroup) { return NULL; } -static inline void blkio_group_init(struct blkio_group *blkg) {} static inline void blkiocg_add_blkio_group(struct blkio_cgroup *blkcg, struct blkio_group *blkg, void *key, dev_t dev) {} @@ -253,9 +250,9 @@ static inline void blkiocg_update_completion_stats(struct blkio_group *blkg, bool sync) {} static inline void blkiocg_update_io_merged_stats(struct blkio_group *blkg, bool direction, bool sync) {} -static inline void blkiocg_update_request_add_stats(struct blkio_group *blkg, +static inline void blkiocg_update_io_add_stats(struct blkio_group *blkg, struct blkio_group *curr_blkg, bool direction, bool sync) {} -static inline void blkiocg_update_request_remove_stats(struct blkio_group *blkg, +static inline void blkiocg_update_io_remove_stats(struct blkio_group *blkg, bool direction, bool sync) {} #endif #endif /* _BLK_CGROUP_H */