This is v2 of the series posted here:
http://lkml.kernel.org/r/cover.1702045299.git.nav...@kernel.org
Since v2, the primary change is that the entire ftrace sequence is moved
out of line and this is now restricted to 64-bit powerpc by default.
Patch 5 has the details.
I have dropped patches to
Pointer to struct module is only relevant for ftrace records belonging
to kernel modules. Having this field in dyn_arch_ftrace wastes memory
for all ftrace records belonging to the kernel. Remove the same in
favour of looking up the module from the ftrace record address, similar
to other architectu
On 32-bit powerpc, gcc generates a three instruction sequence for
function profiling:
mflrr0
stw r0, 4(r1)
bl _mcount
On kernel boot, the call to _mcount() is nop-ed out, to be patched back
in when ftrace is actually enabled. The 'stw' instruction therefore is
On powerpc, we would like to be able to make a pass on vmlinux.o and
generate a new object file to be linked into vmlinux. Add a generic pass
in link-vmlinux.sh that architectures can use for this purpose.
Architectures need to select CONFIG_ARCH_WANTS_PRE_LINK_VMLINUX and must
provide arch//tools/
Rather than hard-coding the offset into a function to be used to
determine if a kprobe is at function entry, use ftrace_location() to
determine the ftrace location within the function and categorize all
instructions till that offset to be function entry.
For functions that cannot be traced, we fal
Function profile sequence on powerpc includes two instructions at the
beginning of each function:
mflrr0
bl ftrace_caller
The call to ftrace_caller() gets nop'ed out during kernel boot and is
patched in when ftrace is enabled.
Given the sequence, we cannot return from ftr
On Tue, Jun 4, 2024 at 9:46 AM Jani Nikula wrote:
[Maybe slightly off-topic, ranty]
> Why do we think it's a good idea to increase and normalize the use of
> double-underscore function names across the kernel, like
> __match_string() in this case? It should mean "reserved for the
> implementatio
On Mon, Jun 10, 2024 at 5:39 PM Naveen N Rao wrote:
>
> On powerpc, we would like to be able to make a pass on vmlinux.o and
> generate a new object file to be linked into vmlinux. Add a generic pass
> in link-vmlinux.sh that architectures can use for this purpose.
> Architectures need to select C
> On 3 Jun 2024, at 10:28 PM, Adrian Hunter wrote:
>
> On 3/06/24 19:30, Ian Rogers wrote:
>> On Fri, May 31, 2024 at 11:10 PM Athira Rajeev
>> wrote:
>>>
>>> Now perf uses the capstone library to disassemble the instructions in
>>> x86. capstone is used (if available) for perf annotate to s
On 07/06/24 10:13 am, Athira Rajeev wrote:
Perf bench futex fails as below when attempted to run on
on a powerpc system:
./perf bench futex all
Running futex/hash benchmark...
Run summary [PID 626307]: 80 threads, each operating on 1024 [private] futexes
for 10 secs.
perf: pthread_create:
This is an adaptation of commit f3a112c0c40d ("x86,rethook,kprobes:
Replace kretprobe with rethook on x86") to PowerPC.
Replaces the kretprobe code with rethook on Power. With this patch,
kretprobe on Power uses the rethook instead of kretprobe specific
trampoline code.
Reference to other archs:
On Mon, Jun 10, 2024 at 06:14:51PM GMT, Masahiro Yamada wrote:
> On Mon, Jun 10, 2024 at 5:39 PM Naveen N Rao wrote:
> >
> > On powerpc, we would like to be able to make a pass on vmlinux.o and
> > generate a new object file to be linked into vmlinux. Add a generic pass
> > in link-vmlinux.sh that
On Mon, 10 Jun 2024 14:08:15 +0530
Naveen N Rao wrote:
> Pointer to struct module is only relevant for ftrace records belonging
> to kernel modules. Having this field in dyn_arch_ftrace wastes memory
> for all ftrace records belonging to the kernel. Remove the same in
> favour of looking up the m
On Mon, 10 Jun 2024 14:08:16 +0530
Naveen N Rao wrote:
> On 32-bit powerpc, gcc generates a three instruction sequence for
> function profiling:
> mflrr0
> stw r0, 4(r1)
> bl _mcount
>
> On kernel boot, the call to _mcount() is nop-ed out, to be patched back
> in w
On Tue, Jun 11, 2024 at 2:20 AM Naveen N Rao wrote:
>
> On Mon, Jun 10, 2024 at 06:14:51PM GMT, Masahiro Yamada wrote:
> > On Mon, Jun 10, 2024 at 5:39 PM Naveen N Rao wrote:
> > >
> > > On powerpc, we would like to be able to make a pass on vmlinux.o and
> > > generate a new object file to be li
Hi Ganesh,
Ganesh Goudar writes:
> If a PCI device is removed during eeh_pe_report_edev(), edev->pdev
> will change and can cause a crash, hold the PCI rescan/remove lock
> while taking a copy of edev->pdev.
>
> Signed-off-by: Ganesh Goudar
> ---
> arch/powerpc/kernel/eeh_pe.c | 2 ++
> 1 file
From: "Steven Rostedt (Google)"
Yang Li sent a patch to fix the kerneldoc of ftrace_graph_ret_addr().
While reviewing it, I realized that the comments in the entire function
header needed a rewrite. When doing that, I realized that @idx parameter
was being ignored. Every time this was called by t
From: "Steven Rostedt (Google)"
All architectures that implement function graph also implements
HAVE_FUNCTION_GRAPH_RET_ADDR_PTR. Remove it, as it is no longer a
differentiator.
Signed-off-by: Steven Rostedt (Google)
---
Documentation/trace/ftrace-design.rst | 12 -
arch/arm64/include/
I noticed a slight bug in ftrace_graph_ret_addr() for when
HAVE_FUNCTION_GRAPH_RET_ADDR_PTR was defined and fixed it up.
I then noticed it was buggy when not defined. Looking for an
architecture that did not have it defined, I couldn't find any.
So I removed it.
Steven Rostedt (Google) (2):
Simplify loop_reconfigure_limits by always updating the discard limits.
This adds a little more work to loop_set_block_size, but doesn't change
the outcome as the discard flag won't change.
Signed-off-by: Christoph Hellwig
---
drivers/block/loop.c | 10 --
1 file changed, 4 insertions(+)
Move a bit of code that sets up the zone flag and the write granularity
into sd_zbc_read_zones to be with the rest of the zoned limits.
Signed-off-by: Christoph Hellwig
---
drivers/scsi/sd.c | 21 +
drivers/scsi/sd_zbc.c | 13 -
2 files changed, 13 insertions(
Since commit 7437bb73f087 ("block: remove support for the host aware zone
model"), only ZBC devices expose a zoned access model. sd_is_zoned is
used to check for that and thus return false for host aware devices.
Fixes: 7437bb73f087 ("block: remove support for the host aware zone model")
Signed-o
__loop_clr_fd wants to clear all settings on the device. Prepare for
moving more settings into the block limits by open coding
loop_reconfigure_limits.
Signed-off-by: Christoph Hellwig
---
drivers/block/loop.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers
The LOOP_CONFIGURE path automatically upgrades the block size to that
of the underlying file for O_DIRECT file descriptors, but the
LOOP_SET_BLOCK_SIZE path does not. Fix this by lifting the code to
pick the block size into common code.
Signed-off-by: Christoph Hellwig
---
drivers/block/loop.c
Fix the code in loop_reconfigure_limits to pick a default block size for
O_DIRECT file descriptors to also work when the loop device sits on top
of a block device and not just on a regular file on a block device based
file system.
Signed-off-by: Christoph Hellwig
---
drivers/block/loop.c | 8 +++
This prepares for moving the rotational flag into the queue_limits and
also fixes it for the case where the loop device is backed by a block
device.
Signed-off-by: Christoph Hellwig
---
drivers/block/loop.c | 23 ---
1 file changed, 4 insertions(+), 19 deletions(-)
diff --gi
virtblk_update_cache_mode boils down to a single call to
blk_queue_write_cache. Remove it in preparation for moving the cache
control flags into the queue_limits.
Signed-off-by: Christoph Hellwig
---
drivers/block/virtio_blk.c | 13 +++--
1 file changed, 3 insertions(+), 10 deletions(-)
Move setting the cache control flags in nbd in preparation for moving
these flags into the queue_limits structure.
Signed-off-by: Christoph Hellwig
---
drivers/block/nbd.c | 17 +++--
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/drivers/block/nbd.c b/drivers/block/n
blkfront always had a robust negotiation protocol for detecting a write
cache. Stop simply disabling cache flushes when they fail as that is
a grave error.
Signed-off-by: Christoph Hellwig
---
drivers/block/xen-blkfront.c | 29 +
1 file changed, 9 insertions(+), 20 d
queue_attr_store updates attributes used to control generating I/O, and
can cause malformed bios if changed with I/O in flight. Freeze the queue
in common code instead of adding it to almost every attribute.
Signed-off-by: Christoph Hellwig
---
block/blk-mq.c| 5 +++--
block/blk-sysfs.c | 9
Fold blk_flush_policy into the only caller to prepare for pending changes
to it.
Signed-off-by: Christoph Hellwig
---
block/blk-flush.c | 33 +++--
1 file changed, 15 insertions(+), 18 deletions(-)
diff --git a/block/blk-flush.c b/block/blk-flush.c
index c17cf8ed8113
Move the cache control settings into the queue_limits so that they
can be set atomically and all I/O is frozen when changing the
flags.
Add new features and flags field for the driver set flags, and internal
(usually sysfs-controlled) flags in the block layer. Note that we'll
eventually remove en
Move the norot flag into the queue_limits feature field so that it can be
set atomically and all I/O is frozen when changing the flag.
Use the chance to switch to defaulting to non-rotational and require
the driver to opt into rotational, which matches the polarity of the
sysfs interface.
For the
Move the add_random flag into the queue_limits feature field so that it
can be set atomically and all I/O is frozen when changing the flag.
Note that this also removes code from dm to clear the flag based on
the underlying devices, which can't be reached as dm devices will
always start out without
Move the io_stat flag into the queue_limits feature field so that it
can be set atomically and all I/O is frozen when changing the flag.
Simplify md and dm to set the flag unconditionally instead of avoiding
setting a simple flag for cases where it already is set by other means,
which is a bit poi
Move the io_stat flag into the queue_limits feature field so that it can
be set atomically and all I/O is frozen when changing the flag.
The flag is now inherited by blk_stack_limits, which greatly simplifies
the code in dm, and fixed md which previously did not pass on the flag
set on lower devic
Move the synchronous flag into the queue_limits feature field so that it
can be set atomically and all I/O is frozen when changing the flag.
Signed-off-by: Christoph Hellwig
---
block/blk-mq-debugfs.c| 1 -
drivers/block/brd.c | 2 +-
drivers/block/zram/zram_drv.c | 4 ++--
dri
Move the nowait flag into the queue_limits feature field so that it
can be set atomically and all I/O is frozen when changing the flag.
Stacking drivers are simplified in that they now can simply set the
flag, and blk_stack_limits will clear it when the features is not
supported by any of the unde
Move the poll flag into the queue_limits feature field so that it
can be set atomically and all I/O is frozen when changing the flag.
Stacking drivers are simplified in that they now can simply set the
flag, and blk_stack_limits will clear it when the features is not
supported by any of the underl
Move the dax flag into the queue_limits feature field so that it
can be set atomically and all I/O is frozen when changing the flag.
Signed-off-by: Christoph Hellwig
---
block/blk-mq-debugfs.c | 1 -
drivers/md/dm-table.c| 4 ++--
drivers/nvdimm/pmem.c| 7 ++-
drivers/s
Move the boolean zoned field into the flags field to reclaim a little
bit of space.
Signed-off-by: Christoph Hellwig
---
block/blk-settings.c | 5 ++---
drivers/block/null_blk/zoned.c | 2 +-
drivers/block/ublk_drv.c | 2 +-
drivers/block/virtio_blk.c | 5 +++--
drivers/m
Move the zone_resetall flag into the queue_limits feature field so that
it can be set atomically and all I/O is frozen when changing the flag.
Signed-off-by: Christoph Hellwig
---
block/blk-mq-debugfs.c | 1 -
drivers/block/null_blk/zoned.c | 3 +--
drivers/block/ublk_drv.c | 4 +--
Move the skip_tagset_quiesce flag into the queue_limits feature field so
that it can be set atomically and all I/O is frozen when changing the
flag.
Signed-off-by: Christoph Hellwig
---
block/blk-mq-debugfs.c | 1 -
drivers/nvme/host/core.c | 8 +---
include/linux/blkdev.h | 6 --
3
Move the pci_p2pdma flag into the queue_limits feature field so that it
can be set atomically and all I/O is frozen when changing the flag.
Signed-off-by: Christoph Hellwig
---
block/blk-mq-debugfs.c | 1 -
drivers/nvme/host/core.c | 8 +++-
include/linux/blkdev.h | 7 ---
3 files ch
Move the bounce field into the flags field to reclaim a little bit of
space.
Signed-off-by: Christoph Hellwig
---
block/blk-settings.c| 1 -
block/blk.h | 2 +-
drivers/scsi/scsi_lib.c | 2 +-
include/linux/blkdev.h | 6 --
4 files changed, 6 insertions(+), 5 deletions(-)
d
On 6/11/24 2:19 PM, Christoph Hellwig wrote:
> Since commit 7437bb73f087 ("block: remove support for the host aware zone
> model"), only ZBC devices expose a zoned access model. sd_is_zoned is
> used to check for that and thus return false for host aware devices.
>
> Fixes: 7437bb73f087 ("block:
On 6/11/24 2:19 PM, Christoph Hellwig wrote:
> Move a bit of code that sets up the zone flag and the write granularity
> into sd_zbc_read_zones to be with the rest of the zoned limits.
>
> Signed-off-by: Christoph Hellwig
> ---
> drivers/scsi/sd.c | 21 +
> drivers/scsi/s
On Tue, Jun 11, 2024 at 02:51:24PM +0900, Damien Le Moal wrote:
> > - if (lim->zoned)
> > + if (sdkp->device->type == TYPE_ZBC)
>
> Nit: use sd_is_zoned() here ?
Yes.
> > - if (!sd_is_zoned(sdkp))
> > + if (!sd_is_zoned(sdkp)) {
> > + lim->zoned = false;
>
> Maybe we should cl
On 6/11/24 2:19 PM, Christoph Hellwig wrote:
> __loop_clr_fd wants to clear all settings on the device. Prepare for
> moving more settings into the block limits by open coding
> loop_reconfigure_limits.
>
> Signed-off-by: Christoph Hellwig
> ---
> drivers/block/loop.c | 10 +-
> 1 file
On Tue, Jun 11, 2024 at 07:52:39AM +0200, Christoph Hellwig wrote:
> > Maybe we should clear the other zone related limits here ? If the drive is
> > reformatted/converted from SMR to CMR (FORMAT WITH PRESET), the other zone
> > limits may be set already, no ?
>
> blk_validate_zoned_limits already
On 6/11/24 2:19 PM, Christoph Hellwig wrote:
> Simplify loop_reconfigure_limits by always updating the discard limits.
> This adds a little more work to loop_set_block_size, but doesn't change
> the outcome as the discard flag won't change.
>
> Signed-off-by: Christoph Hellwig
Looks OK to me.
R
On Tue, Jun 11, 2024 at 02:53:19PM +0900, Damien Le Moal wrote:
> > + /* reset the block size to the default */
> > + lim = queue_limits_start_update(lo->lo_queue);
> > + lim.logical_block_size = 512;
>
> Nit: SECTOR_SIZE ? maybe ?
Yes. I was following the existing code, but SECTOR_SIZE is
On 6/11/24 2:19 PM, Christoph Hellwig wrote:
> The LOOP_CONFIGURE path automatically upgrades the block size to that
> of the underlying file for O_DIRECT file descriptors, but the
> LOOP_SET_BLOCK_SIZE path does not. Fix this by lifting the code to
> pick the block size into common code.
s/lock/
On 6/11/24 2:19 PM, Christoph Hellwig wrote:
> Fix the code in loop_reconfigure_limits to pick a default block size for
> O_DIRECT file descriptors to also work when the loop device sits on top
> of a block device and not just on a regular file on a block device based
> file system.
>
> Signed-off
On Tue, Jun 11, 2024 at 02:56:59PM +0900, Damien Le Moal wrote:
> > + if (!bsize)
> > + bsize = loop_default_blocksize(lo, inode->i_sb->s_bdev);
>
> If bsize is specified and there is a backing dev used with direct IO, should
> it
> be checked that bsize is a multiple of bdev_logical_
On Tue, Jun 11, 2024 at 02:58:56PM +0900, Damien Le Moal wrote:
> > + if (S_ISBLK(inode->i_mode))
> > + backing_bdev = I_BDEV(inode);
> > + else if (inode->i_sb->s_bdev)
> > + backing_bdev = inode->i_sb->s_bdev;
> > +
>
> Why not move this hunk inside the below "if" ? (back
On 6/11/24 2:19 PM, Christoph Hellwig wrote:
> This prepares for moving the rotational flag into the queue_limits and
> also fixes it for the case where the loop device is backed by a block
> device.
>
> Signed-off-by: Christoph Hellwig
Looks good to me.
Reviewed-by: Damien Le Moal
--
Damien
57 matches
Mail list logo