Re: [PATCH 1/2] docs, xen/arm: Introduce reserved heap memory

2022-08-30 Thread Michal Orzel
On 30/08/2022 08:29, Michal Orzel wrote: > Hi Henry, > > On 30/08/2022 02:58, Henry Wang wrote: >> >> Hi Stefano and Michal, >> >>> -Original Message- >>> From: Stefano Stabellini >>> Sent: Tuesday, August 30, 2022 8:47 AM >>> To: Henry Wang >>> Cc: Michal Orzel ; xen-devel@lists.xenproj

Re: [PATCH 2/2] xen/arm: Handle reserved heap pages in boot and heap allocator

2022-08-30 Thread Michal Orzel
Hi Henry, On 30/08/2022 08:11, Henry Wang wrote: > > Hi Michal, > > Sorry about the late reply - I had a couple of days off. Thank you very > much for the review! I will add my reply and answer some of your > questions below. > >> -Original Message- >> From: Michal Orzel >> Subject: Re

RE: [PATCH 1/2] docs, xen/arm: Introduce reserved heap memory

2022-08-30 Thread Henry Wang
Hi Michal, > -Original Message- > From: Michal Orzel > >> +printk("Checking for reserved heap in /chosen\n"); > >> +if ( address_cells < 1 || size_cells < 1 ) > > address_cells and size_cells cannot be negative so you could just check > if > > there are 0.

[libvirt test] 172864: regressions - FAIL

2022-08-30 Thread osstest service owner
flight 172864 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/172864/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf-libvirt 6 libvirt-buildfail REGR. vs. 151777 build-amd64-libvirt

RE: [PATCH 2/2] xen/arm: Handle reserved heap pages in boot and heap allocator

2022-08-30 Thread Henry Wang
Hi Michal, > -Original Message- > From: Michal Orzel > >>> > >> Did you consider putting reserved_heap into bootinfo structure? > > > > Actually I did, but I saw current bootinfo only contains some structs so > > I was not sure if this is the preferred way, but since you are raising this

Re: USB-C 250GB SSD Passthrough fails to DomU Ubuntu

2022-08-30 Thread A Sudheer
Few more logs >From Dom0, did passthrough of two USB drives (32GB stick and 250GB USB SDD) In DomU, 32GB driver got mounted but 250GB SSD fails to mount. In DomU, "lsusb" shows both the drives but "usb-devices" shows only the 32GB drive. *Dom0 log:* amd@HOST:~$ sudo xl usb-list vm1 Devid Type

[ovmf test] 172863: regressions - FAIL

2022-08-30 Thread osstest service owner
flight 172863 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/172863/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i386-libvirt6 libvirt-buildfail REGR. vs. 172136 build-amd64-libvirt

RE: [PATCH 2/2] xen/arm: Handle reserved heap pages in boot and heap allocator

2022-08-30 Thread Henry Wang
Hi Stefano, > -Original Message- > From: Stefano Stabellini > > +paddr_t reserved_heap_start = ~0, reserved_heap_end = 0, > > INVALID_PADDR or ~0ULL Ack. > > > /* > > * If the user has not requested otherwise via the command line > > * then locate the xenheap usin

[qemu-mainline test] 172859: regressions - FAIL

2022-08-30 Thread osstest service owner
flight 172859 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/172859/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-libvirt 6 libvirt-buildfail REGR. vs. 172123 build-i386-libvir

Re: [PATCH 2/2] xen/arm: Handle reserved heap pages in boot and heap allocator

2022-08-30 Thread Michal Orzel
Hi Henry, On 30/08/2022 10:00, Henry Wang wrote: > > Hi Michal, > >> -Original Message- >> From: Michal Orzel > Did you consider putting reserved_heap into bootinfo structure? >>> >>> Actually I did, but I saw current bootinfo only contains some structs so >>> I was not sure if

RE: [PATCH 2/2] xen/arm: Handle reserved heap pages in boot and heap allocator

2022-08-30 Thread Henry Wang
Hi Michal, > -Original Message- > From: Michal Orzel > >> This is totally fine. What I mean is that the check you introduced does not > >> correspond > >> to the panic message below. In case of reserved heap, its size is selected > by > >> the user. > >> "Not enough space for xenheap" mea

Re: [PATCH 2/2] xen/arm: Handle reserved heap pages in boot and heap allocator

2022-08-30 Thread Michal Orzel
On 30/08/2022 11:17, Henry Wang wrote: > > Hi Michal, > >> -Original Message- >> From: Michal Orzel This is totally fine. What I mean is that the check you introduced does not correspond to the panic message below. In case of reserved heap, its size is selected >> by >>

RE: [PATCH 2/2] xen/arm: Handle reserved heap pages in boot and heap allocator

2022-08-30 Thread Henry Wang
Hi Michal, > -Original Message- > From: Michal Orzel > > > > Oh I think get your point. Let me try to explain myself and thanks for your > > patience :)) > > > > The reserved heap region defined in the device tree should be used for > both > > Xenheap and domain heap, so if we reserved a

[xen-unstable test] 172861: tolerable FAIL

2022-08-30 Thread osstest service owner
flight 172861 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/172861/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-i386-libvirt-qemuu-debianhvm-amd64-xsm 1 build-check(1) blocked n/a test-amd64-i386-libvirt-raw 1 buil

Re: [RFC PATCH v1] xen/docs: Document acquire resource interface

2022-08-30 Thread Paul Durrant
On 29/08/2022 10:03, Matias Ezequiel Vara Larsen wrote: This commit creates a new doc to document the acquire resource interface. This is a reference document. Signed-off-by: Matias Ezequiel Vara Larsen --- Changes in v1: - correct documentation about how mfns are allocated - correct documentat

[ovmf test] 172870: regressions - FAIL

2022-08-30 Thread osstest service owner
flight 172870 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/172870/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i386-libvirt6 libvirt-buildfail REGR. vs. 172136 build-amd64-libvirt

Xen in ARM environment networking overload issue

2022-08-30 Thread Oleshii Wood
Hello guys, The same issue migh be found by link https://xen.markmail.org/message/3w4oqeu5z7ryfbsb?q=xen_add_phys_to_mach_entry&page=1 DOM0/DOMU kernels version 5.15.19 Two XENified guests. They are equal. They both have the same configuration. It is enough to have one DomU and Dom0. Part of Do

[linux-linus test] 172865: regressions - FAIL

2022-08-30 Thread osstest service owner
flight 172865 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/172865/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-libvirt 6 libvirt-buildfail REGR. vs. 172133 build-arm64-libvirt

[ovmf test] 172872: regressions - FAIL

2022-08-30 Thread osstest service owner
flight 172872 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/172872/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i386-libvirt6 libvirt-buildfail REGR. vs. 172136 build-amd64-libvirt

[linux-5.4 test] 172866: regressions - FAIL

2022-08-30 Thread osstest service owner
flight 172866 linux-5.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/172866/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i386-libvirt6 libvirt-buildfail REGR. vs. 172128 build-amd64-libvirt

RE: [PATCH 2/2] xen/arm: Handle reserved heap pages in boot and heap allocator

2022-08-30 Thread Stefano Stabellini
On Tue, 30 Aug 2022, Henry Wang wrote: > > > /* > > > * If the user has not requested otherwise via the command line > > > * then locate the xenheap using these constraints: > > > @@ -743,7 +766,8 @@ static void __init setup_mm(void) > > > * We try to allocate the largest xen

RE: [PATCH 2/2] xen/arm: Handle reserved heap pages in boot and heap allocator

2022-08-30 Thread Stefano Stabellini
On Tue, 30 Aug 2022, Henry Wang wrote: > > -Original Message- > > From: Michal Orzel > > > > > > Oh I think get your point. Let me try to explain myself and thanks for > > > your > > > patience :)) > > > > > > The reserved heap region defined in the device tree should be used for > > both

RE: [PATCH 2/2] xen/arm: Handle reserved heap pages in boot and heap allocator

2022-08-30 Thread Stefano Stabellini
On Tue, 30 Aug 2022, Henry Wang wrote: > Hi Michal, > > > -Original Message- > > From: Michal Orzel > > >>> > > >> Did you consider putting reserved_heap into bootinfo structure? > > > > > > Actually I did, but I saw current bootinfo only contains some structs so > > > I was not sure if t

[qemu-mainline test] 172869: regressions - FAIL

2022-08-30 Thread osstest service owner
flight 172869 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/172869/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-libvirt 6 libvirt-buildfail REGR. vs. 172123 build-i386-libvir

[PATCH] acpi: Add TPM2 interface definition and make the TPM version configurable.

2022-08-30 Thread Jennifer Herbert
This patch introduces an optional TPM 2 interface definition to the ACPI table, which is to be used as part of a vTPM 2 implementation. To enable the new interface - I have made the TPM interface version configurable in the acpi_config, with the default being the existing 1.2.(TCPA) I have also add

[ovmf test] 172876: regressions - FAIL

2022-08-30 Thread osstest service owner
flight 172876 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/172876/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i386-libvirt6 libvirt-buildfail REGR. vs. 172136 build-amd64-libvirt

[PATCH v2] xen/device_tree: Fix MISRA C 2012 Rule 20.7 violations

2022-08-30 Thread Xenia Ragiadakou
Add parentheses around the macro parameters that are used as expressions to prevent against unintended expansions during macro substitution. Signed-off-by: Xenia Ragiadakou --- Changes in v2: - apply rule 20.7 as is, without deviating from it - adjust commit message accordingly Also, in this fi

[ovmf test] 172878: regressions - FAIL

2022-08-30 Thread osstest service owner
flight 172878 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/172878/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i386-libvirt6 libvirt-buildfail REGR. vs. 172136 build-amd64-libvirt

[linux-linus test] 172873: regressions - FAIL

2022-08-30 Thread osstest service owner
flight 172873 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/172873/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-libvirt 6 libvirt-buildfail REGR. vs. 172133 build-arm64-libvirt

RE: [PATCH 2/2] xen/arm: Handle reserved heap pages in boot and heap allocator

2022-08-30 Thread Henry Wang
Hi Stefano, > -Original Message- > From: Stefano Stabellini > > > and we can automatically calculate xenheap_pages in a single line. > > > > Here I am a little bit confused. Sorry to ask but could you please explain > > a little bit more about why we can calculate the xenheap_pages in a s

RE: [PATCH 2/2] xen/arm: Handle reserved heap pages in boot and heap allocator

2022-08-30 Thread Henry Wang
Hi Stefano, > -Original Message- > From: Stefano Stabellini > Subject: RE: [PATCH 2/2] xen/arm: Handle reserved heap pages in boot and > heap allocator > > On Tue, 30 Aug 2022, Henry Wang wrote: > > > -Original Message- > > > From: Michal Orzel > > > > > > > > Oh I think get you

Re: [RFC PATCH 22/30] Code tagging based fault injection

2022-08-30 Thread Randy Dunlap
On 8/30/22 14:49, Suren Baghdasaryan wrote: > From: Kent Overstreet > > This adds a new fault injection capability, based on code tagging. > > To use, simply insert somewhere in your code > > dynamic_fault("fault_class_name") > > and check whether it returns true - if so, inject the error

Re: [RFC PATCH 27/30] Code tagging based latency tracking

2022-08-30 Thread Randy Dunlap
On 8/30/22 14:49, Suren Baghdasaryan wrote: > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index b7d03afbc808..b0f86643b8f0 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -1728,6 +1728,14 @@ config LATENCYTOP > Enable this option if you want to use the LatencyTOP

[ovmf test] 172880: regressions - FAIL

2022-08-30 Thread osstest service owner
flight 172880 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/172880/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i386-libvirt6 libvirt-buildfail REGR. vs. 172136 build-amd64-libvirt

RE: [PATCH 2/2] xen/arm: Handle reserved heap pages in boot and heap allocator

2022-08-30 Thread Henry Wang
Hi Stefano, > -Original Message- > From: Henry Wang > I am not sure about that, since we already have > heap_pages = reserved_heap ? reserved_heap_pages : ram_pages; > > the heap_pages is supposed to contain domheap_pages + xenheap_pages > based on the reserved heap definition discussed i

[PATCH v11 1/6] xen: do not free reserved memory into heap

2022-08-30 Thread Penny Zheng
Pages used as guest RAM for static domain, shall be reserved to this domain only. So in case reserved pages being used for other purpose, users shall not free them back to heap, even when last ref gets dropped. This commit introduces a new helper free_domstatic_page to free static page in runtime,

[PATCH v11 2/6] xen/arm: introduce CDF_staticmem

2022-08-30 Thread Penny Zheng
In order to have an easy and quick way to find out whether this domain memory is statically configured, this commit introduces a new flag CDF_staticmem and a new helper is_domain_using_staticmem() to tell. Signed-off-by: Penny Zheng Acked-by: Julien Grall Acked-by: Jan Beulich --- v11 changes:

[PATCH v11 0/6] populate/unpopulate memory when domain on static allocation

2022-08-30 Thread Penny Zheng
Today when a domain unpopulates the memory on runtime, they will always hand the memory over to the heap allocator. And it will be a problem if it is a static domain. Pages used as guest RAM for static domain shall always be reserved to this domain only, and not be used for any other purposes, so t

[PATCH v11 3/6] xen: unpopulate memory when domain is static

2022-08-30 Thread Penny Zheng
Today when a domain unpopulates the memory on runtime, they will always hand the memory back to the heap allocator. And it will be a problem if domain is static. Pages as guest RAM for static domain shall be reserved to only this domain and not be used for any other purposes, so they shall never g

[PATCH v11 4/6] xen: introduce prepare_staticmem_pages

2022-08-30 Thread Penny Zheng
Later, we want to use acquire_domstatic_pages() for populating memory for static domain on runtime, however, there are a lot of pointless work (checking mfn_valid(), scrubbing the free part, cleaning the cache...) considering we know the page is valid and belong to the guest. This commit splits ac

[PATCH v11 5/6] xen: rename free_staticmem_pages to unprepare_staticmem_pages

2022-08-30 Thread Penny Zheng
The name of free_staticmem_pages is inappropriate, considering it is the opposite of function prepare_staticmem_pages. Rename free_staticmem_pages to unprepare_staticmem_pages. Signed-off-by: Penny Zheng Acked-by: Jan Beulich --- v11 changes: - moved ahead of "xen: retrieve reserved pages on po

[PATCH v11 6/6] xen: retrieve reserved pages on populate_physmap

2022-08-30 Thread Penny Zheng
When a static domain populates memory through populate_physmap at runtime, it shall retrieve reserved pages from resv_page_list to make sure that guest RAM is still restricted in statically configured memory regions. This commit also introduces a new helper acquire_reserved_page to make it work. S

[linux-5.4 test] 172875: regressions - FAIL

2022-08-30 Thread osstest service owner
flight 172875 linux-5.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/172875/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i386-libvirt6 libvirt-buildfail REGR. vs. 172128 build-amd64-libvirt

[qemu-mainline test] 172877: regressions - FAIL

2022-08-30 Thread osstest service owner
flight 172877 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/172877/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-libvirt 6 libvirt-buildfail REGR. vs. 172123 build-i386-libvir

[RFC PATCH 03/30] Lazy percpu counters

2022-08-30 Thread Suren Baghdasaryan
From: Kent Overstreet This patch adds lib/lazy-percpu-counter.c, which implements counters that start out as atomics, but lazily switch to percpu mode if the update rate crosses some threshold (arbitrarily set at 256 per second). Signed-off-by: Kent Overstreet --- include/linux/lazy-percpu-cou

[RFC PATCH 07/30] lib: add support for allocation tagging

2022-08-30 Thread Suren Baghdasaryan
Introduce CONFIG_ALLOC_TAGGING which provides definitions to easily instrument allocators. It also registers an "alloc_tags" codetag type with defbugfs interface to output allocation tags information. Signed-off-by: Suren Baghdasaryan Co-developed-by: Kent Overstreet Signed-off-by: Kent Overstre

[RFC PATCH 13/30] mm/slab: introduce SLAB_NO_OBJ_EXT to avoid obj_ext creation

2022-08-30 Thread Suren Baghdasaryan
Slab extension objects can't be allocated before slab infrastructure is initialized. Some caches, like kmem_cache and kmem_cache_node, are created before slab infrastructure is initialized. Objects from these caches can't have extension objects. Introduce SLAB_NO_OBJ_EXT slab flag to mark these cac

[RFC PATCH 01/30] kernel/module: move find_kallsyms_symbol_value declaration

2022-08-30 Thread Suren Baghdasaryan
Allow find_kallsyms_symbol_value to be called by code outside of kernel/module. It will be used for code tagging module support. Signed-off-by: Suren Baghdasaryan --- include/linux/module.h | 1 + kernel/module/internal.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/incl

[RFC PATCH 02/30] lib/string_helpers: Drop space in string_get_size's output

2022-08-30 Thread Suren Baghdasaryan
From: Kent Overstreet Previously, string_get_size() outputted a space between the number and the units, i.e. 9.88 MiB This changes it to 9.88MiB which allows it to be parsed correctly by the 'sort -h' command. Signed-off-by: Kent Overstreet Cc: Andy Shevchenko Cc: Michael Ellerman Cc: B

[RFC PATCH 00/30] Code tagging framework and applications

2022-08-30 Thread Suren Baghdasaryan
=== Code tagging framework === Code tag is a structure identifying a specific location in the source code which is generated at compile time and can be embedded in an application- specific structure. Several applications of code tagging are included i

[RFC PATCH 05/30] lib: code tagging framework

2022-08-30 Thread Suren Baghdasaryan
Add basic infrastructure to support code tagging which stores tag common information consisting of the module name, function, file name and line number. Provide functions to register a new code tag type and navigate between code tags. Co-developed-by: Kent Overstreet Signed-off-by: Kent Overstree

[RFC PATCH 06/30] lib: code tagging module support

2022-08-30 Thread Suren Baghdasaryan
Add support for code tagging from dynamically loaded modules. Signed-off-by: Suren Baghdasaryan Co-developed-by: Kent Overstreet Signed-off-by: Kent Overstreet --- include/linux/codetag.h | 12 ++ kernel/module/main.c| 4 lib/codetag.c | 51 +

[RFC PATCH 04/30] scripts/kallysms: Always include __start and __stop symbols

2022-08-30 Thread Suren Baghdasaryan
From: Kent Overstreet These symbols are used to denote section boundaries: by always including them we can unify loading sections from modules with loading built-in sections, which leads to some significant cleanup. Signed-off-by: Kent Overstreet --- scripts/kallsyms.c | 13 + 1 fi

[RFC PATCH 08/30] lib: introduce page allocation tagging

2022-08-30 Thread Suren Baghdasaryan
Introduce CONFIG_PAGE_ALLOC_TAGGING which provides helper functions to easily instrument page allocators and adds a page_ext field to store a pointer to the allocation tag associated with the code that allocated the page. Signed-off-by: Suren Baghdasaryan Co-developed-by: Kent Overstreet Signed-

[RFC PATCH 12/30] mm: introduce __GFP_NO_OBJ_EXT flag to selectively prevent slabobj_ext creation

2022-08-30 Thread Suren Baghdasaryan
Introduce __GFP_NO_OBJ_EXT flag in order to prevent recursive allocations when allocating slabobj_ext on a slab. Signed-off-by: Suren Baghdasaryan --- include/linux/gfp_types.h | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/linux/gfp_types.h b/include/l

[RFC PATCH 20/30] lib: introduce support for storing code tag context

2022-08-30 Thread Suren Baghdasaryan
Add support for code tag context capture when registering a new code tag type. When context capture for a specific code tag is enabled, codetag_ref will point to a codetag_ctx object which can be attached to an application-specific object storing code invocation context. codetag_ctx has a pointer t

[RFC PATCH 09/30] change alloc_pages name in dma_map_ops to avoid name conflicts

2022-08-30 Thread Suren Baghdasaryan
After redefining alloc_pages, all uses of that name are being replaced. Change the conflicting names to prevent preprocessor from replacing them when it's not intended. Signed-off-by: Suren Baghdasaryan --- arch/x86/kernel/amd_gart_64.c | 2 +- drivers/iommu/dma-iommu.c | 2 +- drivers/xen/g

[RFC PATCH 10/30] mm: enable page allocation tagging for __get_free_pages and alloc_pages

2022-08-30 Thread Suren Baghdasaryan
Redefine alloc_pages, __get_free_pages to record allocations done by these functions. Instrument deallocation hooks to record object freeing. Signed-off-by: Suren Baghdasaryan --- include/linux/gfp.h | 10 +++--- include/linux/page_ext.h| 3 ++- include/linux/pgalloc_tag.h | 35

[RFC PATCH 14/30] mm: prevent slabobj_ext allocations for slabobj_ext and kmem_cache objects

2022-08-30 Thread Suren Baghdasaryan
Use __GFP_NO_OBJ_EXT to prevent recursions when allocating slabobj_ext objects. Also prevent slabobj_ext allocations for kmem_cache objects. Signed-off-by: Suren Baghdasaryan --- mm/memcontrol.c | 2 ++ mm/slab.h | 6 ++ 2 files changed, 8 insertions(+) diff --git a/mm/memcontrol.c b/

[RFC PATCH 11/30] mm: introduce slabobj_ext to support slab object extensions

2022-08-30 Thread Suren Baghdasaryan
Currently slab pages can store only vectors of obj_cgroup pointers in page->memcg_data. Introduce slabobj_ext structure to allow more data to be stored for each slab object. Wraps obj_cgroup into slabobj_ext to support current functionality while allowing to extend slabobj_ext in the future. Note:

[RFC PATCH 15/30] lib: introduce slab allocation tagging

2022-08-30 Thread Suren Baghdasaryan
Introduce CONFIG_SLAB_ALLOC_TAGGING which provides helper functions to easily instrument slab allocators and adds a codetag_ref field into slabobj_ext to store a pointer to the allocation tag associated with the code that allocated the slab object. Signed-off-by: Suren Baghdasaryan Co-developed-b

[RFC PATCH 17/30] lib/string.c: strsep_no_empty()

2022-08-30 Thread Suren Baghdasaryan
From: Kent Overstreet This adds a new helper which is like strsep, except that it skips empty tokens. Signed-off-by: Kent Overstreet --- include/linux/string.h | 1 + lib/string.c | 19 +++ 2 files changed, 20 insertions(+) diff --git a/include/linux/string.h b/incl

[RFC PATCH 16/30] mm: enable slab allocation tagging for kmalloc and friends

2022-08-30 Thread Suren Baghdasaryan
Redefine kmalloc, krealloc, kzalloc, kcalloc, etc. to record allocations and deallocations done by these functions. Signed-off-by: Suren Baghdasaryan Co-developed-by: Kent Overstreet Signed-off-by: Kent Overstreet --- include/linux/slab.h | 103 +-- mm/s

[RFC PATCH 21/30] lib: implement context capture support for page and slab allocators

2022-08-30 Thread Suren Baghdasaryan
Implement mechanisms for capturing allocation call context which consists of: - allocation size - pid, tgid and name of the allocating task - allocation timestamp - allocation call stack The patch creates alloc_tags.ctx file which can be written to enable/disable context capture for a specific code

[RFC PATCH 18/30] codetag: add codetag query helper functions

2022-08-30 Thread Suren Baghdasaryan
From: Kent Overstreet Provide codetag_query_parse() to parse codetag queries and codetag_matches_query() to check if the query affects a given codetag. Signed-off-by: Kent Overstreet --- include/linux/codetag.h | 27 lib/codetag.c | 135 +

[RFC PATCH 22/30] Code tagging based fault injection

2022-08-30 Thread Suren Baghdasaryan
From: Kent Overstreet This adds a new fault injection capability, based on code tagging. To use, simply insert somewhere in your code dynamic_fault("fault_class_name") and check whether it returns true - if so, inject the error. For example if (dynamic_fault("init")) return -EINVAL;

[RFC PATCH 19/30] move stack capture functionality into a separate function for reuse

2022-08-30 Thread Suren Baghdasaryan
Make save_stack() function part of stackdepot API to be used outside of page_owner. Also rename task_struct's in_page_owner to in_capture_stack flag to better convey the wider use of this flag. Signed-off-by: Suren Baghdasaryan --- include/linux/sched.h | 6 ++-- include/linux/stackdepot.h

[RFC PATCH 26/30] bcache: Convert to lib/time_stats

2022-08-30 Thread Suren Baghdasaryan
From: Kent Overstreet This patch converts bcache to the new generic time_stats code lib/time_stats.c. The new code is from bcachefs, and has some changes from the version in bcache: - we now use ktime_get_ns(), not local_clock(). When the code was originally written multi processor systems t

[RFC PATCH 25/30] lib/time_stats: New library for statistics on events

2022-08-30 Thread Suren Baghdasaryan
From: Kent Overstreet This adds a small new library for tracking statistics on events that have a duration, i.e. a start and end time. - number of events - rate/frequency - average duration - max duration - duration quantiles This code comes from bcachefs, and originally bcache: the next p

[RFC PATCH 24/30] wait: Clean up waitqueue_entry initialization

2022-08-30 Thread Suren Baghdasaryan
From: Kent Overstreet Cleanup for code tagging latency tracking: Add an initializer, WAIT_FUNC_INITIALIZER(), to be used by initializers for structs that include wait_queue_entries. Also, change init_wait(), init_wait_entry etc. to be a wrapper around the new __init_waitqueue_entry(); more de-

[RFC PATCH 30/30] MAINTAINERS: Add entries for code tagging & related

2022-08-30 Thread Suren Baghdasaryan
From: Kent Overstreet The new code & libraries added are being maintained - mark them as such. Signed-off-by: Kent Overstreet --- MAINTAINERS | 34 ++ 1 file changed, 34 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 589517372408..902c96744bcb 10064

[RFC PATCH 29/30] dyndbg: Convert to code tagging

2022-08-30 Thread Suren Baghdasaryan
From: Kent Overstreet This converts dynamic debug to the new code tagging framework, which provides an interface for iterating over objects in a particular elf section. It also converts the debugfs interface from seq_file to the style used by other code tagging users, which also makes the code a

[RFC PATCH 28/30] Improved symbolic error names

2022-08-30 Thread Suren Baghdasaryan
From: Kent Overstreet This patch adds per-error-site error codes, with error strings that include their file and line number. To use, change code that returns an error, e.g. return -ENOMEM; to return -ERR(ENOMEM); Then, errname() will return a string that includes the file and line numb

[RFC PATCH 23/30] timekeeping: Add a missing include

2022-08-30 Thread Suren Baghdasaryan
From: Kent Overstreet We need ktime.h for ktime_t. Signed-off-by: Kent Overstreet --- include/linux/timekeeping.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h index fe1e467ba046..7c43e98cf211 100644 --- a/include/linux/timekeepin

[RFC PATCH 27/30] Code tagging based latency tracking

2022-08-30 Thread Suren Baghdasaryan
From: Kent Overstreet This adds the ability to easily instrument code for measuring latency. To use, add the following to calls to your code, at the start and end of the event you wish to measure: code_tag_time_stats_start(start_time); code_tag_time_stats_finish(start_time); Stastistics wil

[ovmf test] 172883: regressions - FAIL

2022-08-30 Thread osstest service owner
flight 172883 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/172883/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i386-libvirt6 libvirt-buildfail REGR. vs. 172136 build-amd64-libvirt