Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 376993
b: refs/heads/master
c: 1045296
h: refs/heads/master
i:
  376991: 20e21cc
v: v3
  • Loading branch information
Dan Carpenter authored and Jiri Kosina committed May 29, 2013
1 parent 1fdd9ad commit c86f447
Show file tree
Hide file tree
Showing 13 changed files with 145 additions and 119 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1fbeeba35e1a25f1a7598e0f5d1433c18084e96a
refs/heads/master: 104529661b645295903c5007ae632d2dd4029254
12 changes: 3 additions & 9 deletions trunk/Documentation/bcache.txt
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,7 @@ cache<0..n>
Symlink to each of the cache devices comprising this cache set.

cache_available_percent
Percentage of cache device which doesn't contain dirty data, and could
potentially be used for writeback. This doesn't mean this space isn't used
for clean cached data; the unused statistic (in priority_stats) is typically
much lower.
Percentage of cache device free.

clear_stats
Clears the statistics associated with this cache
Expand Down Expand Up @@ -426,11 +423,8 @@ nbuckets
Total buckets in this cache

priority_stats
Statistics about how recently data in the cache has been accessed.
This can reveal your working set size. Unused is the percentage of
the cache that doesn't contain any data. Metadata is bcache's
metadata overhead. Average is the average priority of cache buckets.
Next is a list of quantiles with the priority threshold of each.
Statistics about how recently data in the cache has been accessed. This can
reveal your working set size.

written
Sum of all data that has been written to the cache; comparison with
Expand Down
8 changes: 6 additions & 2 deletions trunk/Documentation/devices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,12 @@ Your cooperation is appreciated.

Each device type has 5 bits (32 minors).

13 block Previously used for the XT disk (/dev/xdN)
Deleted in kernel v3.9.
13 block 8-bit MFM/RLL/IDE controller
0 = /dev/xda First XT disk whole disk
64 = /dev/xdb Second XT disk whole disk

Partitions are handled in the same way as IDE disks
(see major number 3).

14 char Open Sound System (OSS)
0 = /dev/mixer Mixer control
Expand Down
3 changes: 3 additions & 0 deletions trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3330,6 +3330,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
plus one apbt timer for broadcast timer.
x86_mrst_timer=apbt_only | lapic_and_apbt

xd= [HW,XT] Original XT pre-IDE (RLL encoded) disks.
xd_geo= See header of drivers/block/xd.c.

xen_emul_unplug= [HW,X86,XEN]
Unplug Xen emulated devices
Format: [unplug0,][unplug1]
Expand Down
2 changes: 2 additions & 0 deletions trunk/Documentation/m68k/kernel-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ Valid names are:
/dev/sdd: -> 0x0830 (forth SCSI disk)
/dev/sde: -> 0x0840 (fifth SCSI disk)
/dev/fd : -> 0x0200 (floppy disk)
/dev/xda: -> 0x0c00 (first XT disk, unused in Linux/m68k)
/dev/xdb: -> 0x0c40 (second XT disk, unused in Linux/m68k)

The name must be followed by a decimal number, that stands for the
partition number. Internally, the value of the number is just
Expand Down
2 changes: 1 addition & 1 deletion trunk/block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3164,7 +3164,7 @@ void blk_post_runtime_resume(struct request_queue *q, int err)
q->rpm_status = RPM_ACTIVE;
__blk_run_queue(q);
pm_runtime_mark_last_busy(q->dev);
pm_request_autosuspend(q->dev);
pm_runtime_autosuspend(q->dev);
} else {
q->rpm_status = RPM_SUSPENDED;
}
Expand Down
8 changes: 3 additions & 5 deletions trunk/drivers/block/mtip32xx/mtip32xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -3002,8 +3002,7 @@ static int mtip_hw_debugfs_init(struct driver_data *dd)

static void mtip_hw_debugfs_exit(struct driver_data *dd)
{
if (dd->dfs_node)
debugfs_remove_recursive(dd->dfs_node);
debugfs_remove_recursive(dd->dfs_node);
}


Expand Down Expand Up @@ -3864,7 +3863,7 @@ static void mtip_make_request(struct request_queue *queue, struct bio *bio)
struct driver_data *dd = queue->queuedata;
struct scatterlist *sg;
struct bio_vec *bvec;
int i, nents = 0;
int nents = 0;
int tag = 0, unaligned = 0;

if (unlikely(dd->dd_flag & MTIP_DDF_STOP_IO)) {
Expand Down Expand Up @@ -3922,12 +3921,11 @@ static void mtip_make_request(struct request_queue *queue, struct bio *bio)
}

/* Create the scatter list for this bio. */
bio_for_each_segment(bvec, bio, i) {
bio_for_each_segment(bvec, bio, nents) {
sg_set_page(&sg[nents],
bvec->bv_page,
bvec->bv_len,
bvec->bv_offset);
nents++;
}

/* Issue the read/write. */
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/block/pktcdvd.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@

#define MAX_SPEED 0xffff

#define ZONE(sector, pd) (((sector) + (pd)->offset) & ~((pd)->settings.size - 1))
#define ZONE(sector, pd) (((sector) + (pd)->offset) & \
~(sector_t)((pd)->settings.size - 1))

static DEFINE_MUTEX(pktcdvd_mutex);
static struct pktcdvd_device *pkt_devs[MAX_WRITERS];
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/md/bcache/Kconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

config BCACHE
tristate "Block device as cache"
select CLOSURES
---help---
Allows a block device to be used as cache for other devices; uses
a btree for indexing and the layout is optimized for SSDs.
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/md/bcache/bcache.h
Original file line number Diff line number Diff line change
Expand Up @@ -1241,7 +1241,7 @@ void bch_cache_set_stop(struct cache_set *);
struct cache_set *bch_cache_set_alloc(struct cache_sb *);
void bch_btree_cache_free(struct cache_set *);
int bch_btree_cache_alloc(struct cache_set *);
void bch_cached_dev_writeback_init(struct cached_dev *);
void bch_writeback_init_cached_dev(struct cached_dev *);
void bch_moving_init_cache_set(struct cache_set *);

void bch_cache_allocator_exit(struct cache *ca);
Expand Down
34 changes: 18 additions & 16 deletions trunk/drivers/md/bcache/stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,24 @@ static struct attribute *bch_stats_files[] = {
};
static KTYPE(bch_stats);

static void scale_accounting(unsigned long data);

void bch_cache_accounting_init(struct cache_accounting *acc,
struct closure *parent)
{
kobject_init(&acc->total.kobj, &bch_stats_ktype);
kobject_init(&acc->five_minute.kobj, &bch_stats_ktype);
kobject_init(&acc->hour.kobj, &bch_stats_ktype);
kobject_init(&acc->day.kobj, &bch_stats_ktype);

closure_init(&acc->cl, parent);
init_timer(&acc->timer);
acc->timer.expires = jiffies + accounting_delay;
acc->timer.data = (unsigned long) acc;
acc->timer.function = scale_accounting;
add_timer(&acc->timer);
}

int bch_cache_accounting_add_kobjs(struct cache_accounting *acc,
struct kobject *parent)
{
Expand Down Expand Up @@ -226,19 +244,3 @@ void bch_mark_sectors_bypassed(struct search *s, int sectors)
atomic_add(sectors, &dc->accounting.collector.sectors_bypassed);
atomic_add(sectors, &s->op.c->accounting.collector.sectors_bypassed);
}

void bch_cache_accounting_init(struct cache_accounting *acc,
struct closure *parent)
{
kobject_init(&acc->total.kobj, &bch_stats_ktype);
kobject_init(&acc->five_minute.kobj, &bch_stats_ktype);
kobject_init(&acc->hour.kobj, &bch_stats_ktype);
kobject_init(&acc->day.kobj, &bch_stats_ktype);

closure_init(&acc->cl, parent);
init_timer(&acc->timer);
acc->timer.expires = jiffies + accounting_delay;
acc->timer.data = (unsigned long) acc;
acc->timer.function = scale_accounting;
add_timer(&acc->timer);
}
Loading

0 comments on commit c86f447

Please sign in to comment.