Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d76bb7a
tools/power turbostat: Print /dev/cpu_dma_latency
lenb May 27, 2020
9aefc2c
tools/power turbostat: Always print idle in the system configuration …
Mar 26, 2020
7c2ccc5
tools/power turbostat: Make the energy variable to be 64 bit
yu-chen-surf Apr 18, 2020
87e15da
tools/power turbostat: Introduce functions to accumulate RAPL consump…
yu-chen-surf Apr 18, 2020
9972d5d
tools/power turbostat: Enable accumulate RAPL display
yu-chen-surf Apr 18, 2020
8201a02
tools/power turbostat: Use sched_getcpu() instead of hardcoded cpu 0
prarit Jun 29, 2020
b88cad5
tools/power turbostat: Replace HTTP links with HTTPS ones: TURBOSTAT …
Al2Klimov Jul 8, 2020
fecb3bc
tools/power turbostat: Fix output formatting for ACPI CST enumeration
darcari Aug 10, 2020
e7af1ed
tools/power turbostat: Support additional CPU model numbers
lenb Aug 13, 2020
c315a09
tools/power turbostat: Skip pc8, pc9, pc10 columns, if they are disabled
lenb Aug 13, 2020
0936cdf
tools/power x86_energy_perf_policy: Input/output error in a VM
olysonek Mar 27, 2020
b4b9156
tools/power turbostat: Add a new GFXAMHz column that exposes gt_act_f…
Apr 22, 2020
20de0da
tools/power turbostat: Remove empty columns for Jacobsville
anttilaakso Aug 17, 2020
33eb822
tools/power turbostat: Support AMD Family 19h
kimphillamd Aug 17, 2020
4be61e6
tools/power turbostat: Build with _FILE_OFFSET_BITS=64
amonakov Aug 23, 2020
6ff7cb3
tools/power turbostat: adjust for temperature offset
lenb Sep 29, 2020
3d7772e
tools/power turbostat: harden against cpu hotplug
lenb Oct 1, 2020
77f6ab8
don't dump the threads that had been already exiting when zapped.
Oct 28, 2020
a1fbc67
btrfs: fix potential overflow in cluster_pages_for_defrag on 32bit arch
Oct 4, 2020
e38fdb7
btrfs: print the block rsv type when we fail our reservation
josefbacik Oct 26, 2020
fca3a45
btrfs: fix min reserved size calculation in merge_reloc_root
josefbacik Oct 26, 2020
f07728d
btrfs: clean up NULL checks in qgroup_unreserve_range()
Oct 23, 2020
a4852cf
btrfs: scrub: update message regarding read-only status
kdave Jul 9, 2020
cf89af1
btrfs: dev-replace: fail mount if we don't have replace item with tar…
asj Oct 29, 2020
468600c
btrfs: ref-verify: fix memory leak in btrfs_ref_tree_mod
dinghaoliu Oct 21, 2020
92cfcd0
fscrypt: remove reachable WARN in fscrypt_setup_iv_ino_lblk_32_key()
ebiggers Oct 31, 2020
949dd01
powercap: restrict energy meter to root access
lenb Nov 10, 2020
3e9fa99
tools/power turbostat: update version number
lenb Oct 1, 2020
8bff39b
Merge branch 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel…
torvalds Nov 10, 2020
52d1998
Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscr…
torvalds Nov 10, 2020
e2f0c56
Merge tag 'for-5.10-rc3-tag' of git://git.kernel.org/pub/scm/linux/ke…
torvalds Nov 10, 2020
eccc876
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git…
torvalds Nov 10, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions drivers/powercap/powercap_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,9 @@ static void create_power_zone_common_attributes(
&dev_attr_max_energy_range_uj.attr;
if (power_zone->ops->get_energy_uj) {
if (power_zone->ops->reset_energy_uj)
dev_attr_energy_uj.attr.mode = S_IWUSR | S_IRUGO;
dev_attr_energy_uj.attr.mode = S_IWUSR | S_IRUSR;
else
dev_attr_energy_uj.attr.mode = S_IRUGO;
dev_attr_energy_uj.attr.mode = S_IRUSR;
power_zone->zone_dev_attrs[count++] =
&dev_attr_energy_uj.attr;
}
Expand Down
3 changes: 2 additions & 1 deletion fs/btrfs/block-rsv.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,8 @@ struct btrfs_block_rsv *btrfs_use_block_rsv(struct btrfs_trans_handle *trans,
/*DEFAULT_RATELIMIT_BURST*/ 1);
if (__ratelimit(&_rs))
WARN(1, KERN_DEBUG
"BTRFS: block rsv returned %d\n", ret);
"BTRFS: block rsv %d returned %d\n",
block_rsv->type, ret);
}
try_reserve:
ret = btrfs_reserve_metadata_bytes(root, block_rsv, blocksize,
Expand Down
26 changes: 24 additions & 2 deletions fs/btrfs/dev-replace.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,17 @@ int btrfs_init_dev_replace(struct btrfs_fs_info *fs_info)
ret = btrfs_search_slot(NULL, dev_root, &key, path, 0, 0);
if (ret) {
no_valid_dev_replace_entry_found:
/*
* We don't have a replace item or it's corrupted. If there is
* a replace target, fail the mount.
*/
if (btrfs_find_device(fs_info->fs_devices,
BTRFS_DEV_REPLACE_DEVID, NULL, NULL, false)) {
btrfs_err(fs_info,
"found replace target device without a valid replace item");
ret = -EUCLEAN;
goto out;
}
ret = 0;
dev_replace->replace_state =
BTRFS_IOCTL_DEV_REPLACE_STATE_NEVER_STARTED;
Expand Down Expand Up @@ -143,8 +154,19 @@ int btrfs_init_dev_replace(struct btrfs_fs_info *fs_info)
case BTRFS_IOCTL_DEV_REPLACE_STATE_NEVER_STARTED:
case BTRFS_IOCTL_DEV_REPLACE_STATE_FINISHED:
case BTRFS_IOCTL_DEV_REPLACE_STATE_CANCELED:
dev_replace->srcdev = NULL;
dev_replace->tgtdev = NULL;
/*
* We don't have an active replace item but if there is a
* replace target, fail the mount.
*/
if (btrfs_find_device(fs_info->fs_devices,
BTRFS_DEV_REPLACE_DEVID, NULL, NULL, false)) {
btrfs_err(fs_info,
"replace devid present without an active replace item");
ret = -EUCLEAN;
} else {
dev_replace->srcdev = NULL;
dev_replace->tgtdev = NULL;
}
break;
case BTRFS_IOCTL_DEV_REPLACE_STATE_STARTED:
case BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED:
Expand Down
10 changes: 4 additions & 6 deletions fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1274,6 +1274,7 @@ static int cluster_pages_for_defrag(struct inode *inode,
u64 page_start;
u64 page_end;
u64 page_cnt;
u64 start = (u64)start_index << PAGE_SHIFT;
int ret;
int i;
int i_done;
Expand All @@ -1290,8 +1291,7 @@ static int cluster_pages_for_defrag(struct inode *inode,
page_cnt = min_t(u64, (u64)num_pages, (u64)file_end - start_index + 1);

ret = btrfs_delalloc_reserve_space(BTRFS_I(inode), &data_reserved,
start_index << PAGE_SHIFT,
page_cnt << PAGE_SHIFT);
start, page_cnt << PAGE_SHIFT);
if (ret)
return ret;
i_done = 0;
Expand Down Expand Up @@ -1380,8 +1380,7 @@ static int cluster_pages_for_defrag(struct inode *inode,
btrfs_mod_outstanding_extents(BTRFS_I(inode), 1);
spin_unlock(&BTRFS_I(inode)->lock);
btrfs_delalloc_release_space(BTRFS_I(inode), data_reserved,
start_index << PAGE_SHIFT,
(page_cnt - i_done) << PAGE_SHIFT, true);
start, (page_cnt - i_done) << PAGE_SHIFT, true);
}


Expand All @@ -1408,8 +1407,7 @@ static int cluster_pages_for_defrag(struct inode *inode,
put_page(pages[i]);
}
btrfs_delalloc_release_space(BTRFS_I(inode), data_reserved,
start_index << PAGE_SHIFT,
page_cnt << PAGE_SHIFT, true);
start, page_cnt << PAGE_SHIFT, true);
btrfs_delalloc_release_extents(BTRFS_I(inode), page_cnt << PAGE_SHIFT);
extent_changeset_free(data_reserved);
return ret;
Expand Down
12 changes: 4 additions & 8 deletions fs/btrfs/qgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -3435,24 +3435,20 @@ static int qgroup_unreserve_range(struct btrfs_inode *inode,
{
struct rb_node *node;
struct rb_node *next;
struct ulist_node *entry = NULL;
struct ulist_node *entry;
int ret = 0;

node = reserved->range_changed.root.rb_node;
if (!node)
return 0;
while (node) {
entry = rb_entry(node, struct ulist_node, rb_node);
if (entry->val < start)
node = node->rb_right;
else if (entry)
node = node->rb_left;
else
break;
node = node->rb_left;
}

/* Empty changeset */
if (!entry)
return 0;

if (entry->val > start && rb_prev(&entry->rb_node))
entry = rb_entry(rb_prev(&entry->rb_node), struct ulist_node,
rb_node);
Expand Down
1 change: 1 addition & 0 deletions fs/btrfs/ref-verify.c
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,7 @@ int btrfs_ref_tree_mod(struct btrfs_fs_info *fs_info,
"dropping a ref for a root that doesn't have a ref on the block");
dump_block_entry(fs_info, be);
dump_ref_action(fs_info, ra);
kfree(ref);
kfree(ra);
goto out_unlock;
}
Expand Down
4 changes: 3 additions & 1 deletion fs/btrfs/relocation.c
Original file line number Diff line number Diff line change
Expand Up @@ -1648,6 +1648,7 @@ static noinline_for_stack int merge_reloc_root(struct reloc_control *rc,
struct btrfs_root_item *root_item;
struct btrfs_path *path;
struct extent_buffer *leaf;
int reserve_level;
int level;
int max_level;
int replaced = 0;
Expand Down Expand Up @@ -1696,7 +1697,8 @@ static noinline_for_stack int merge_reloc_root(struct reloc_control *rc,
* Thus the needed metadata size is at most root_level * nodesize,
* and * 2 since we have two trees to COW.
*/
min_reserved = fs_info->nodesize * btrfs_root_level(root_item) * 2;
reserve_level = max_t(int, 1, btrfs_root_level(root_item));
min_reserved = fs_info->nodesize * reserve_level * 2;
memset(&next_key, 0, sizeof(next_key));

while (1) {
Expand Down
5 changes: 3 additions & 2 deletions fs/btrfs/scrub.c
Original file line number Diff line number Diff line change
Expand Up @@ -3866,8 +3866,9 @@ int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start,
if (!is_dev_replace && !readonly &&
!test_bit(BTRFS_DEV_STATE_WRITEABLE, &dev->dev_state)) {
mutex_unlock(&fs_info->fs_devices->device_list_mutex);
btrfs_err_in_rcu(fs_info, "scrub: device %s is not writable",
rcu_str_deref(dev->name));
btrfs_err_in_rcu(fs_info,
"scrub on devid %llu: filesystem on %s is not writable",
devid, rcu_str_deref(dev->name));
ret = -EROFS;
goto out;
}
Expand Down
26 changes: 7 additions & 19 deletions fs/btrfs/volumes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1056,22 +1056,13 @@ static void __btrfs_free_extra_devids(struct btrfs_fs_devices *fs_devices,
continue;
}

if (device->devid == BTRFS_DEV_REPLACE_DEVID) {
/*
* In the first step, keep the device which has
* the correct fsid and the devid that is used
* for the dev_replace procedure.
* In the second step, the dev_replace state is
* read from the device tree and it is known
* whether the procedure is really active or
* not, which means whether this device is
* used or whether it should be removed.
*/
if (step == 0 || test_bit(BTRFS_DEV_STATE_REPLACE_TGT,
&device->dev_state)) {
continue;
}
}
/*
* We have already validated the presence of BTRFS_DEV_REPLACE_DEVID,
* in btrfs_init_dev_replace() so just continue.
*/
if (device->devid == BTRFS_DEV_REPLACE_DEVID)
continue;

if (device->bdev) {
blkdev_put(device->bdev, device->mode);
device->bdev = NULL;
Expand All @@ -1080,9 +1071,6 @@ static void __btrfs_free_extra_devids(struct btrfs_fs_devices *fs_devices,
if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state)) {
list_del_init(&device->dev_alloc_list);
clear_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state);
if (!test_bit(BTRFS_DEV_STATE_REPLACE_TGT,
&device->dev_state))
fs_devices->rw_devices--;
}
list_del_init(&device->dev_list);
fs_devices->num_devices--;
Expand Down
4 changes: 1 addition & 3 deletions fs/crypto/keysetup.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,7 @@ static int fscrypt_setup_iv_ino_lblk_32_key(struct fscrypt_info *ci,
* New inodes may not have an inode number assigned yet.
* Hashing their inode number is delayed until later.
*/
if (ci->ci_inode->i_ino == 0)
WARN_ON(!(ci->ci_inode->i_state & I_CREATING));
else
if (ci->ci_inode->i_ino)
fscrypt_hash_inode_number(ci, mk);
return 0;
}
Expand Down
5 changes: 4 additions & 1 deletion kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,10 @@ static void exit_mm(void)
mmap_read_unlock(mm);

self.task = current;
self.next = xchg(&core_state->dumper.next, &self);
if (self.task->flags & PF_SIGNALED)
self.next = xchg(&core_state->dumper.next, &self);
else
self.task = NULL;
/*
* Implies mb(), the result of xchg() must be visible
* to core_state->dumper.
Expand Down
3 changes: 2 additions & 1 deletion tools/power/x86/turbostat/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ turbostat : turbostat.c
override CFLAGS += -O2 -Wall -I../../../include
override CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"'
override CFLAGS += -DINTEL_FAMILY_HEADER='"../../../../arch/x86/include/asm/intel-family.h"'
override CFLAGS += -D_FILE_OFFSET_BITS=64
override CFLAGS += -D_FORTIFY_SOURCE=2

%: %.c
@mkdir -p $(BUILD_OUTPUT)
$(CC) $(CFLAGS) $< -o $(BUILD_OUTPUT)/$@ $(LDFLAGS) -lcap
$(CC) $(CFLAGS) $< -o $(BUILD_OUTPUT)/$@ $(LDFLAGS) -lcap -lrt

.PHONY : clean
clean :
Expand Down
2 changes: 1 addition & 1 deletion tools/power/x86/turbostat/turbostat.8
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ that they count at TSC rate, which is true on all processors tested to date.

.SH REFERENCES
Volume 3B: System Programming Guide"
http://www.intel.com/products/processor/manuals/
https://www.intel.com/products/processor/manuals/

.SH FILES
.ta
Expand Down
Loading