RE: [PATCH v9 04/20] dlb: add device ioctl layer and first three ioctls

2021-01-27 Thread Chen, Mike Ximing
> -Original Message- > From: Greg KH > Sent: Wednesday, January 27, 2021 7:29 AM > To: Chen, Mike Ximing > Cc: linux-kernel@vger.kernel.org; a...@arndb.de; Williams, Dan J > ; pierre-louis.boss...@linux.intel.com; Gage Eads > > Subject: Re: [PATCH v9 04/20] dlb

Re: PROBLEM: Crash after mm: fix initialization of struct page for holes in memory layout

2021-01-27 Thread Mike Rapoport
On Wed, Jan 27, 2021 at 11:08:17AM +0100, Łukasz Majczak wrote: > Hi Mike, > > Actually I have a serial console attached (via servo device), but > there is no output :( and also the reboot/crash is very fast/immediate > after power on. If you boot with earlyprintk=serial are the

Re: PROBLEM: Crash after mm: fix initialization of struct page for holes in memory layout

2021-01-27 Thread Mike Rapoport
987542182281...@build.alporthouse.com I presume serial console is not an option, so if you could boot with earlyprintk=vga and see if there is anything useful printed on the screen it would be really helpful. > Best regards > Lukasz -- Sincerely yours, Mike.

Re: [PATCH] net: mdiobus: Prevent spike on MDIO bus reset signal

2021-01-26 Thread Mike Looijmans
See below. Met vriendelijke groet / kind regards, Mike Looijmans System Expert TOPIC Embedded Products B.V. Materiaalweg 4, 5681 RJ Best The Netherlands T: +31 (0) 499 33 69 69 E: mike.looijm...@topicproducts.com W: www.topicproducts.com Please consider the environment before printing

Re: [PATCH 2/2] mm/hugetlb: refactor subpage recording

2021-01-26 Thread Mike Kravetz
On 1/26/21 11:21 AM, Joao Martins wrote: > On 1/26/21 6:08 PM, Mike Kravetz wrote: >> On 1/25/21 12:57 PM, Joao Martins wrote: >>> >>> +static void record_subpages_vmas(struct page *page, struct vm_area_struct >>> *vma, >>> +

Re: [PATCH] mm/hugetlb: Simplify the calculation of variables

2021-01-26 Thread Mike Kravetz
gt; 1 file changed, 1 insertion(+), 2 deletions(-) Thanks, Reviewed-by: Mike Kravetz -- Mike Kravetz > > diff --git a/mm/hugetlb.c b/mm/hugetlb.c > index cbf32d2..5e6a6e7 100644 > --- a/mm/hugetlb.c > +++ b/mm/hugetlb.c > @@ -3367,8 +3367,7 @@ static unsigned in

Re: [PATCH 2/2] mm/hugetlb: refactor subpage recording

2021-01-26 Thread Mike Kravetz
On 1/26/21 4:07 PM, Jason Gunthorpe wrote: > On Tue, Jan 26, 2021 at 01:21:46PM -0800, Mike Kravetz wrote: >> On 1/26/21 11:21 AM, Joao Martins wrote: >>> On 1/26/21 6:08 PM, Mike Kravetz wrote: >>>> On 1/25/21 12:57 PM, Joao Martins wrote: >>>>> >&g

Re: [PATCH] mm/hugetlb: Fix use after free when subpool max_hpages accounting is not enabled

2021-01-26 Thread Mike Kravetz
by: Miaohe Lin > --- > mm/hugetlb.c | 16 +--- > 1 file changed, 13 insertions(+), 3 deletions(-) Thanks, Reviewed-by: Mike Kravetz -- Mike Kravetz > > diff --git a/mm/hugetlb.c b/mm/hugetlb.c > index 777bc0e45bf3..53ea65d1c5ab 100644 > --- a/mm/hugetlb.c &

Re: [PATCH v1] csky: use free_initmem_default() in free_initmem()

2021-01-26 Thread Mike Rapoport
ton > Cc: Guo Ren > Cc: Mike Rapoport > Cc: Oscar Salvador > Cc: Michal Hocko > Cc: Wei Yang > Signed-off-by: David Hildenbrand > --- > > Not compile tested as documentation on how to get > https://gitlab.com/c-sky/buildroot > running, especially wit

Re: [PATCH 2/2] mm/hugetlb: refactor subpage recording

2021-01-26 Thread Mike Kravetz
so large that we do not guarantee that page++ pointer * arithmetic will work across the entire page. We need something more * specialized. */ static void __copy_gigantic_page(struct page *dst, struct page *src, int nr_pages) -- Mike Kravetz > +

Re: Linux 5.11-rc5

2021-01-26 Thread Mike Rapoport
On Mon, Jan 25, 2021 at 09:13:59PM +, Chris Wilson wrote: > Quoting Mike Rapoport (2021-01-25 21:04:56) > > On Mon, Jan 25, 2021 at 08:34:34PM +, Chris Wilson wrote: > > > Quoting Linus Torvalds (2021-01-25 01:06:40) > > > > Mike Rapoport (3): > > > .

Re: [PATCH v16 08/11] secretmem: add memcg accounting

2021-01-26 Thread Mike Rapoport
On Tue, Jan 26, 2021 at 08:31:42AM +0100, Michal Hocko wrote: > On Mon 25-01-21 23:38:17, Mike Rapoport wrote: > > On Mon, Jan 25, 2021 at 05:54:51PM +0100, Michal Hocko wrote: > > > On Thu 21-01-21 14:27:20, Mike Rapoport wrote: > > > > From: Mike Rapoport &

Re: [PATCH v16 06/11] mm: introduce memfd_secret system call to create "secret" memory areas

2021-01-26 Thread Mike Rapoport
On Tue, Jan 26, 2021 at 08:16:14AM +0100, Michal Hocko wrote: > On Mon 25-01-21 23:36:18, Mike Rapoport wrote: > > On Mon, Jan 25, 2021 at 06:01:22PM +0100, Michal Hocko wrote: > > > On Thu 21-01-21 14:27:18, Mike Rapoport wrote: > > > > From: Mike Rapopo

[PATCH] net: mdiobus: Prevent spike on MDIO bus reset signal

2021-01-26 Thread Mike Looijmans
D_OUT_HIGH, this removes the spike and also removes a line of code since the signal is already high. Signed-off-by: Mike Looijmans --- drivers/net/phy/mdio_bus.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 2b

Re: Linux 5.11-rc5

2021-01-26 Thread Mike Rapoport
On Mon, Jan 25, 2021 at 09:46:19PM +, Chris Wilson wrote: > Quoting Mike Rapoport (2021-01-25 21:33:48) > > On Mon, Jan 25, 2021 at 12:49:39PM -0800, Linus Torvalds wrote: > > > On Mon, Jan 25, 2021 at 12:35 PM Chris Wilson > > > wrote: > > > > > &

Re: [PATCH v3] perf: cs-etm: update ETM metadata format

2021-01-26 Thread Mike Leach
Hi Leo, On Sat, 23 Jan 2021 at 15:23, Leo Yan wrote: > > Hi Mike, > > On Tue, Jan 19, 2021 at 06:01:10PM +, Mike Leach wrote: > > [...] > > > +/* > > + * Read a single cpu parameter block from the auxtrace_info priv block. > > + * > > + * For

Re: [PATCH 1/2] mm/hugetlb: grab head page refcount once per group of subpages

2021-01-26 Thread Mike Kravetz
+++--- > 3 files changed, 29 insertions(+), 22 deletions(-) Thanks. Nice straight forward improvement. Reviewed-by: Mike Kravetz -- Mike Kravetz > > diff --git a/include/linux/mm.h b/include/linux/mm.h > index a5d618d08506..0d793486822b 100644 > --- a/include/li

Re: [PATCH v16 06/11] mm: introduce memfd_secret system call to create "secret" memory areas

2021-01-26 Thread Mike Rapoport
On Tue, Jan 26, 2021 at 10:00:13AM +0100, Michal Hocko wrote: > On Tue 26-01-21 10:33:11, Mike Rapoport wrote: > > On Tue, Jan 26, 2021 at 08:16:14AM +0100, Michal Hocko wrote: > > > On Mon 25-01-21 23:36:18, Mike Rapoport wrote: > > > > On Mon, Jan 25, 2021 at 06:01:

Re: [PATCH] mm: hugetlb: fix missing put_page in gather_surplus_pages()

2021-01-26 Thread Mike Kravetz
lb page on the free list with a count of 1. There is no check in the enqueue code. When we dequeue the page, set_page_refcounted() is used to set the count to 1 without looking at the current value. And, all the other VM_DEBUG macros are off so we mostly do not notice the bug. Thanks again, Reviewed-by: Mike Kravetz -- Mike Kravetz > } > free: >

[PATCH v8 2/2] iio: accel: Add support for the Bosch-Sensortec BMI088

2021-01-25 Thread Mike Looijmans
The BMI088 is a combined module with both accelerometer and gyroscope. This adds the accelerometer driver support for the SPI interface. The gyroscope part is already supported by the BMG160 driver. Signed-off-by: Mike Looijmans --- Changes in v8: include order asm/ after linux/ Suspend/resume

[PATCH v8 1/2] dt-bindings: iio: accel: Add bmi088 accelerometer bindings

2021-01-25 Thread Mike Looijmans
This adds the device-tree bindings for the Bosch Sensortec BMI088 IMU, the accelerometer part. Signed-off-by: Mike Looijmans --- Changes in v8: Add spi-max-frequency: true Changes in v7: Add additionalProperties Change bmi088_accel to bmi088-accel Add interrupt-names and adjust description

Re: [External] Re: [PATCH v13 05/12] mm: hugetlb: allocate the vmemmap pages associated with each HugeTLB page

2021-01-25 Thread Mike Kravetz
from there ... > > Yeah, you are right. So I tend to trigger OOM to kill other processes to > reclaim some memory when we allocate memory fails. IIUC, even non-gigantic hugetlb pages can exist in CMA. They can be migrated out of CMA if needed (except free pages in the pool, but that is a separate issue David H already noted in another thread). When we first started discussing this patch set, one suggestion was to force hugetlb pool pages to be allocated at boot time and never permit them to be freed back to the buddy allocator. A primary reason for the suggestion was to avoid this issue of needing to allocate memory when freeing a hugetlb page to buddy. IMO, that would be an unreasonable restriction for many existing hugetlb use cases. A simple thought is that we simply fail the 'freeing hugetlb page to buddy' if we can not allocate the required vmemmap pages. However, as David R says freeing hugetlb pages to buddy is a reasonable way to free up memory in oom situations. However, failing the operation 'might' be better than looping forever trying to allocate the pages needed? As mentioned in the previous patch, it would be better to use GFP_ATOMIC to at least dip into reserves if we can. I think using pages of the hugetlb for vmemmap to cover pages of the hugetlb is the only way we can guarantee success of freeing a hugetlb page to buddy. However, this should only only be used when there is no other option and could result in vmemmap pages residing in CMA or ZONE_MOVABLE. I'm not sure how much better this is than failing the free to buddy operation. I don't have a solution. Just wanted to share some thoughts. BTW, just thought of something else. Consider offlining a memory section that contains a free hugetlb page. The offline code will try to disolve the hugetlb page (free to buddy). So, vmemmap pages will need to be allocated. We will try to allocate vmemap pages on the same node as the hugetlb page. But, if this memory section is the last of the node all the pages will have been isolated and no allocations will succeed. Is that a possible scenario, or am I just having too many negative thoughts? -- Mike Kravetz

Re: Linux 5.11-rc5

2021-01-25 Thread Mike Rapoport
On Mon, Jan 25, 2021 at 12:49:39PM -0800, Linus Torvalds wrote: > On Mon, Jan 25, 2021 at 12:35 PM Chris Wilson > wrote: > > > > Quoting Linus Torvalds (2021-01-25 01:06:40) > > > Mike Rapoport (3): > > ... > > > mm: fix initialization of struct

Re: [PATCH v2] Documentation/admin-guide: kernel-parameters: update CMA entries

2021-01-25 Thread Mike Kravetz
n Corbet > Cc: linux-...@vger.kernel.org > Cc: linux...@kvack.org > Cc: Andrew Morton > Cc: Mike Kravetz > --- > v2: rebase & resend > > Documentation/admin-guide/kernel-parameters.txt |8 > 1 file changed, 4 insertions(+), 4 deletions(-)

Re: [PATCH v16 08/11] secretmem: add memcg accounting

2021-01-25 Thread Mike Rapoport
On Mon, Jan 25, 2021 at 09:18:04AM -0800, Shakeel Butt wrote: > On Mon, Jan 25, 2021 at 8:20 AM Matthew Wilcox wrote: > > > > On Thu, Jan 21, 2021 at 02:27:20PM +0200, Mike Rapoport wrote: > > > From: Mike Rapoport > > > > > > Account memory cons

Re: [PATCH v16 08/11] secretmem: add memcg accounting

2021-01-25 Thread Mike Rapoport
On Mon, Jan 25, 2021 at 05:54:51PM +0100, Michal Hocko wrote: > On Thu 21-01-21 14:27:20, Mike Rapoport wrote: > > From: Mike Rapoport > > > > Account memory consumed by secretmem to memcg. The accounting is updated > > when the memory is actually allocated and free

Re: [PATCH v16 06/11] mm: introduce memfd_secret system call to create "secret" memory areas

2021-01-25 Thread Mike Rapoport
On Mon, Jan 25, 2021 at 06:01:22PM +0100, Michal Hocko wrote: > On Thu 21-01-21 14:27:18, Mike Rapoport wrote: > > From: Mike Rapoport > > > > Introduce "memfd_secret" system call with the ability to create memory > > areas visible only in the context

Re: Linux 5.11-rc5

2021-01-25 Thread Mike Rapoport
On Mon, Jan 25, 2021 at 08:34:34PM +, Chris Wilson wrote: > Quoting Linus Torvalds (2021-01-25 01:06:40) > > Mike Rapoport (3): > ... > > mm: fix initialization of struct page for holes in memory layout > > We have half a dozen or so different machines in CI tha

Re: [PATCH 1/2] x86/setup: consolidate early memory reservations

2021-01-25 Thread Mike Rapoport
On Mon, Jan 25, 2021 at 03:59:11PM +0100, Borislav Petkov wrote: > On Fri, Jan 15, 2021 at 10:32:54AM +0200, Mike Rapoport wrote: > > + trim_low_memory_range(); > > Btw, you can get rid of that one too: > > /* > * Here we put platform-specific memory range workarounds

Re: [PATCH 1/2] x86/setup: consolidate early memory reservations

2021-01-25 Thread Mike Rapoport
On Mon, Jan 25, 2021 at 03:50:41PM +0100, Borislav Petkov wrote: > On Fri, Jan 15, 2021 at 10:32:54AM +0200, Mike Rapoport wrote: > > From: Mike Rapoport > > > > The early reservations of memory areas used by the firmware, bootloader, > > kernel text and data

Re: [PATCH v6 2/2] iio: accel: Add support for the Bosch-Sensortec BMI088

2021-01-25 Thread Mike Looijmans
See below Met vriendelijke groet / kind regards, Mike Looijmans System Expert TOPIC Embedded Products B.V. Materiaalweg 4, 5681 RJ Best The Netherlands T: +31 (0) 499 33 69 69 E: mike.looijm...@topicproducts.com W: www.topicproducts.com Please consider the environment before printing

Re: [PATCH v7 1/2] dt-bindings: iio: accel: Add bmi088 accelerometer bindings

2021-01-24 Thread Mike Looijmans
See below Met vriendelijke groet / kind regards, Mike Looijmans System Expert TOPIC Embedded Products B.V. Materiaalweg 4, 5681 RJ Best The Netherlands T: +31 (0) 499 33 69 69 E: mike.looijm...@topicproducts.com W: www.topicproducts.com Please consider the environment before printing

Re: [RFC 1/2] arm64/mm: Fix pfn_valid() for ZONE_DEVICE based memory

2021-01-24 Thread Mike Rapoport
performance for normal hotplug memory as well. > > > > Cc: Catalin Marinas > > Cc: Will Deacon > > Cc: Ard Biesheuvel > > Cc: Robin Murphy > > Cc: linux-arm-ker...@lists.infradead.org > > Cc: linux-kernel@vger.kernel.org > > Fixes: 73b20c84d42d (

Re: [PATCH] nitro_enclaves: set master in the procedure of NE probe

2021-01-24 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
在 2021/1/20 18:27, Paraschiv, Andra-Irina 写道: > > > On 19/01/2021 05:30, Longpeng(Mike) wrote: >> According the PCI spec: >>    Bus Master Enable – Controls the ability of a PCI Express >>    Endpoint to issue Memory and I/O Read/Write Requests, and >>    the

Re: [PATCH v2 2/2] memblock: do not start bottom-up allocations with kernel_end

2021-01-23 Thread Mike Rapoport
On Sat, Jan 23, 2021 at 06:09:11PM -0800, Andrew Morton wrote: > On Fri, 22 Jan 2021 01:37:14 -0300 Thiago Jung Bauermann > wrote: > > > Mike Rapoport writes: > > > > > > Signed-off-by: Roman Gushchin > > > > > > Reviewed-by: Mike Rapopor

Re: [PATCH v15 03/11] riscv/Kconfig: make direct map manipulation options depend on MMU

2021-01-23 Thread Mike Rapoport
On Fri, Jan 22, 2021 at 08:12:30PM -0800, Palmer Dabbelt wrote: > On Wed, 20 Jan 2021 10:06:04 PST (-0800), r...@kernel.org wrote: > > From: Mike Rapoport > > > > ARCH_HAS_SET_DIRECT_MAP and ARCH_HAS_SET_MEMORY configuration options have > > no meaning

Re: [PATCH v13 03/12] mm: hugetlb: free the vmemmap pages associated with each HugeTLB page

2021-01-22 Thread Mike Kravetz
_each_entry_safe(page, next, list, lru) { > + list_del(>lru); > + free_vmemmap_page(page); > + } > +} > + > +static void vmemmap_remap_pte(pte_t *pte, unsigned long addr, > + struct vmemmap_remap_walk *walk) > +{ &g

Re: [PATCH v2 2/5] hugetlb: convert page_huge_active() HPageMigratable flag

2021-01-22 Thread Mike Kravetz
On 1/21/21 10:53 PM, Miaohe Lin wrote: > Hi: > On 2021/1/20 9:30, Mike Kravetz wrote: >> Use the new hugetlb page specific flag HPageMigratable to replace the >> page_huge_active interfaces. By it's name, page_huge_active implied >> that a huge page was on t

[PATCH v3 5/5] hugetlb: convert PageHugeFreed to HPageFreed flag

2021-01-22 Thread Mike Kravetz
Use new hugetlb specific HPageFreed flag to replace the PageHugeFreed interfaces. Signed-off-by: Mike Kravetz Reviewed-by: Oscar Salvador Reviewed-by: Muchun Song --- include/linux/hugetlb.h | 3 +++ mm/hugetlb.c| 23 --- 2 files changed, 7 insertions(+), 19

[PATCH v3 1/5] hugetlb: use page.private for hugetlb specific page flags

2021-01-22 Thread Mike Kravetz
information will happen in subsequent patches. Signed-off-by: Mike Kravetz --- fs/hugetlbfs/inode.c| 12 ++-- include/linux/hugetlb.h | 68 + mm/hugetlb.c| 48 +++-- 3 files changed, 96 insertions(+), 32 deletions

[PATCH v3 2/5] hugetlb: convert page_huge_active() HPageMigratable flag

2021-01-22 Thread Mike Kravetz
race with code freeing the page. The extra check in page_huge_active shortened the race window, but did not prevent the race. Offline code calling scan_movable_pages already deals with these races, so removing the check is acceptable. Add comment to racy code. Signed-off-by: Mike Kravetz

[PATCH v3 3/5] hugetlb: only set HPageMigratable for migratable hstates

2021-01-22 Thread Mike Kravetz
will not be isolated and no attempt will be made to migrate. We should never get to unmap_and_move_huge_page for a page where migration is not supported, so throw a warning if we do. Signed-off-by: Mike Kravetz --- fs/hugetlbfs/inode.c| 2 +- include/linux/hugetlb.h | 9 + mm/hugetlb.c

[PATCH v3 0/5] create hugetlb flags to consolidate state

2021-01-22 Thread Mike Kravetz
v5.11-rc4-mmotm-2021-01-21-20-07 Mike Kravetz (5): hugetlb: use page.private for hugetlb specific page flags hugetlb: convert page_huge_active() HPageMigratable flag hugetlb: only set HPageMigratable for migratable hstates hugetlb: convert PageHugeTemporary() to HPageTemporary flag hugetlb

[PATCH v3 4/5] hugetlb: convert PageHugeTemporary() to HPageTemporary flag

2021-01-22 Thread Mike Kravetz
. Signed-off-by: Mike Kravetz Reviewed-by: Oscar Salvador --- include/linux/hugetlb.h | 6 ++ mm/hugetlb.c| 36 +++- 2 files changed, 13 insertions(+), 29 deletions(-) diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index cd1960541f2a

Re: [PATCH v2] hugetlbfs: make hugepage size conversion more readable

2021-01-22 Thread Mike Kravetz
Miaohe Lin > --- > fs/hugetlbfs/inode.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Thanks, Reviewed-by: Mike Kravetz -- Mike Kravetz > > diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c > index 25c1857ff45d..c87894b221da 100644 > --- a/fs/hugetlbfs/i

[PATCH v9 10/20] dlb: add register operations for queue management

2021-01-22 Thread Mike Ximing Chen
multiple iterations. This process is finite since software cannot enqueue new events to the DLB's (finite) on-device storage. Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Magnus Karlsson Reviewed-by: Dan Williams --- drivers/misc/dlb/dlb_hw_types.h | 46 +++ drivers/misc

[PATCH v9 20/20] dlb: queue map/unmap workqueue

2021-01-22 Thread Mike Ximing Chen
the operation asynchronously. To that end, the driver uses a workqueue that periodically checks whether any outstanding operations can be completed. This workqueue function is only scheduled when there is at least one outstanding map/unmap operation. Signed-off-by: Gage Eads Signed-off-by: Mike

[PATCH v9 17/20] dlb: add static queue map register operations

2021-01-22 Thread Mike Ximing Chen
e "dynamic" operation, when traffic is flowing in the device, will be added in a later commit.) Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Björn Töpel Reviewed-by: Dan Williams --- drivers/misc/dlb/dlb_resource.c | 144 +++- 1 file cha

[PATCH v9 18/20] dlb: add dynamic queue map register operations

2021-01-22 Thread Mike Ximing Chen
Adds the "dynamic" map procedure and register operations. If a queue map is requested after the domain is started, the driver must disable the requested queue and wait for it to quiesce before mapping it to the requested port. Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen

[PATCH v9 16/20] dlb: add port map/unmap state machine

2021-01-22 Thread Mike Ximing Chen
ap a queue and then immediately requests to unmap it -- the driver will coalesce or cancel outstanding operations. Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Björn Töpel Reviewed-by: Dan Williams --- drivers/misc/dlb/dlb_resource.c | 433 +++- 1 fi

[PATCH v9 03/20] dlb: add resource and device initialization

2021-01-22 Thread Mike Ximing Chen
). Introduce dlb_bitmap_* functions, a thin convenience layer wrapping the Linux bitmap interfaces, used by the bitmaps in the dlb hardware types. Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Magnus Karlsson Reviewed-by: Dan Williams --- drivers/misc/dlb/Makefile | 2

[PATCH v9 01/20] dlb: add skeleton for DLB driver

2021-01-22 Thread Mike Ximing Chen
in the patch. Add a DLB entry to the MAINTAINERS file. Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Magnus Karlsson Reviewed-by: Dan Williams --- Documentation/misc-devices/dlb.rst | 259 +++ Documentation/misc-devices/index.rst | 1

[PATCH v9 00/20] dlb: introduce DLB device driver

2021-01-22 Thread Mike Ximing Chen
blocks - Don't break ioctl ABI when introducing new commands - Remove indirect pointers from ioctl data structures - Remove the get-sched-domain-fd ioctl command Mike Ximing Chen (20): dlb: add skeleton for DLB driver dlb: initialize device dlb: add resource and device initialization dlb: add

[PATCH v9 02/20] dlb: initialize device

2021-01-22 Thread Mike Ximing Chen
function (PF, as implemented here) or virtual function/device (support to be added later). Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Magnus Karlsson Reviewed-by: Dan Williams --- drivers/misc/dlb/Makefile | 1 + drivers/misc/dlb/dlb_hw_types.h | 23

[PATCH v9 04/20] dlb: add device ioctl layer and first three ioctls

2021-01-22 Thread Mike Ximing Chen
-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Magnus Karlsson Reviewed-by: Dan Williams --- .../userspace-api/ioctl/ioctl-number.rst | 1 + drivers/misc/dlb/Makefile | 2 +- drivers/misc/dlb/dlb_bitmap.h | 32 drivers/misc/dlb

[PATCH v9 05/20] dlb: add scheduling domain configuration

2021-01-22 Thread Mike Ximing Chen
ded in subsequent commits. Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Magnus Karlsson Reviewed-by: Dan Williams --- drivers/misc/dlb/dlb_bitmap.h | 74 drivers/misc/dlb/dlb_ioctl.c| 36 +- drivers/misc/dlb/dlb_main.c | 68 drivers/misc/dlb/dlb_main.h |

[PATCH v9 19/20] dlb: add queue unmap register operations

2021-01-22 Thread Mike Ximing Chen
e and wait for it to quiesce before mapping it to the requested port. Add the code to drain unmapped queues during domain reset. This consists of mapping a port to the queue, then calling the function to drain a mapped queue. Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Björn Töpel

[PATCH v9 06/20] dlb: add domain software reset

2021-01-22 Thread Mike Ximing Chen
Add operation to reset a domain's resource's software state when its reference count reaches zero, and re-inserts those resources in their respective available-resources linked lists, for use by future scheduling domains. Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed

[PATCH v9 09/20] dlb: add queue create, reset, get-depth ioctls

2021-01-22 Thread Mike Ximing Chen
Signed-off-by: Mike Ximing Chen Reviewed-by: Magnus Karlsson Reviewed-by: Dan Williams --- drivers/misc/dlb/dlb_hw_types.h | 27 ++ drivers/misc/dlb/dlb_ioctl.c| 63 drivers/misc/dlb/dlb_main.c | 2 + drivers/misc/dlb/dlb_main.h | 17 + drivers/misc/dlb/dlb_pf_ops.c | 36

[PATCH v9 07/20] dlb: add low-level register reset operations

2021-01-22 Thread Mike Ximing Chen
) at that time. Support for these cases will be added in subsequent commits. Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Magnus Karlsson Reviewed-by: Dan Williams --- drivers/misc/dlb/dlb_regs.h | 3527 ++- drivers/misc/dlb/dlb_resource.c

[PATCH v9 08/20] dlb: add runtime power-management support

2021-01-22 Thread Mike Ximing Chen
-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Magnus Karlsson Reviewed-by: Dan Williams --- drivers/misc/dlb/dlb_main.c | 101 +- drivers/misc/dlb/dlb_pf_ops.c | 8 +++ 2 files changed, 108 insertions(+), 1 deletion(-) diff --git a/drivers

[PATCH v9 11/20] dlb: add ioctl to configure ports and query poll mode

2021-01-22 Thread Mike Ximing Chen
ll mode". This (device-wide) mode is selected by the driver; to determine the mode at run time, the driver provides an ioctl for user-space software to query which mode the driver has configured. In this way, the policy of which mode to use is decoupled from user-space software. Signed-off-by: Ga

[PATCH v9 12/20] dlb: add register operations for port management

2021-01-22 Thread Mike Ximing Chen
they are re-assigned to a new scheduling domain in the future and re-enabled. Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Magnus Karlsson Reviewed-by: Dan Williams --- drivers/misc/dlb/dlb_resource.c | 448 +++- 1 file changed, 443

[PATCH v9 13/20] dlb: add port mmap support

2021-01-22 Thread Mike Ximing Chen
a single inode that is shared with other kernel components -- calling unmap_mapping_range() on that shared inode would likely break the kernel. Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Magnus Karlsson Reviewed-by: Dan Williams --- drivers/misc/dlb/Makefile

[PATCH v9 14/20] dlb: add start domain ioctl

2021-01-22 Thread Mike Ximing Chen
the DLB device to start load-balancing operations. It corresponds to rte_event_dev_start() function in DPDK' eventdev library. Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Björn Töpel Reviewed-by: Dan Williams --- drivers/misc/dlb/dlb_ioctl.c| 3 + drivers/misc

[PATCH v9 15/20] dlb: add queue map, unmap, and pending unmap operations

2021-01-22 Thread Mike Ximing Chen
ns support rte_event_port_link(), rte_event_port_unlink() and rte_event_port_unlinks_in_progress() functions of DPDK's eventdev library. Signed-off-by: Gage Eads Signed-off-by: Mike Ximing Chen Reviewed-by: Björn Töpel Reviewed-by: Dan Williams --- drivers/misc/dlb/dlb_ioctl.c| 9 + driver

Re: [PATCH v5 0/5] mm: clean up names and parameters of memmap_init_xxxx functions

2021-01-22 Thread Mike Rapoport
gt; mm: rename memmap_init() and memmap_init_zone() > mm: simplify parater of function memmap_init_zone() > mm: simplify parameter of setup_usemap() > mm: remove unneeded local variable in free_area_init_core For the series: Reviewed-by: Mike Rapoport > > arch/ia64/

[GIT PULL] mm/memblock: typo fix in a comment

2021-01-22 Thread Mike Rapoport
typo in comment of memblock_phys_alloc_try_nid() Levi Yun (1): mm/memblock: Fix typo in comment of memblock_phys_alloc_try_nid() mm/memblock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- Sincerely yours, Mike.

Re: [PATCH] hugetlbfs: make hugepage size conversion more readable

2021-01-21 Thread Mike Kravetz
On 1/21/21 5:42 PM, Miaohe Lin wrote: > Hi: > On 2021/1/22 3:00, Mike Kravetz wrote: >> On 1/20/21 1:23 AM, Miaohe Lin wrote: >>> The calculation 1U << (h->order + PAGE_SHIFT - 10) is actually equal to >>> (PAGE_SHIFT << (h->order)) >&

Re: [PATCH v2] hugetlbfs: remove meaningless variable avoid_reserve

2021-01-21 Thread Mike Kravetz
dd a comment offered by Mike Kravetz to explain this. > > Reviewed-by: David Hildenbrand > Signed-off-by: Miaohe Lin > Cc: Mike Kravetz > --- > fs/hugetlbfs/inode.c | 12 +--- > 1 file changed, 9 insertions(+), 3 deletions(-) Reviewed-by: Mike Kravetz > >

Re: [PATCH] hugetlbfs: make hugepage size conversion more readable

2021-01-21 Thread Mike Kravetz
the kernel, size in KB is often calculated as (size << (PAGE_SHIFT - 10)). If you change the calculation in the hugetlb code to be: huge_page_size(h) << (PAGE_SHIFT - 10) my compiler will actually reduce the size of the routine by one instruction. -- Mike Kravetz > return mnt; > } > >

[PATCH v7 1/2] dt-bindings: iio: accel: Add bmi088 accelerometer bindings

2021-01-21 Thread Mike Looijmans
This adds the device-tree bindings for the Bosch Sensortec BMI088 IMU, the accelerometer part. Signed-off-by: Mike Looijmans --- Changes in v7: Add additionalProperties Change bmi088_accel to bmi088-accel Add interrupt-names and adjust description Changes in v6: I't been almost a year since

[PATCH v7 2/2] iio: accel: Add support for the Bosch-Sensortec BMI088

2021-01-21 Thread Mike Looijmans
The BMI088 is a combined module with both accelerometer and gyroscope. This adds the accelerometer driver support for the SPI interface. The gyroscope part is already supported by the BMG160 driver. Signed-off-by: Mike Looijmans --- Changes in v7: Change bmi088_accel to bmi088-accel Order

[PATCH] x86/platform/uv: Add more to slave cpu kdump info

2021-01-21 Thread Mike Travis
quot;crash note regs" are a key piece of data used by crash dump debuggers to provide a reliable backtrace of running processors.' Signed-off-by: Mike Travis Signed-off-by: Georges Aureau Reviewed-by: Steve Wahl --- arch/x86/platform/uv/uv_nmi.c | 30 +++---

Re: [PATCH 1/1] arm64/sparsemem: reduce SECTION_SIZE_BITS

2021-01-21 Thread Mike Rapoport
these constraints, lets just reduce the section size to 128MB for 4K > and 16K base page size configs, and to 512MB for 64K base page size config. > > Signed-off-by: Sudarshan Rajagopalan > Suggested-by: Anshuman Khandual > Suggested-by: David Hildenbrand > Cc: Catalin Marinas &

[PATCH v16 00/11] mm: introduce memfd_secret system call to create "secret" memory areas

2021-01-21 Thread Mike Rapoport
From: Mike Rapoport Hi, @Andrew, this is based on v5.11-rc4-mmots-2021-01-19-13-54 with secretmem patches dropped from there, I can rebase whatever way you prefer. This is an implementation of "secret" mappings backed by a file descriptor. The file descriptor backing secret memor

[PATCH v16 04/11] set_memory: allow set_direct_map_*_noflush() for multiple pages

2021-01-21 Thread Mike Rapoport
From: Mike Rapoport The underlying implementations of set_direct_map_invalid_noflush() and set_direct_map_default_noflush() allow updating multiple contiguous pages at once. Add numpages parameter to set_direct_map_*_noflush() to expose this ability with these APIs. Signed-off-by: Mike

[PATCH v16 06/11] mm: introduce memfd_secret system call to create "secret" memory areas

2021-01-21 Thread Mike Rapoport
From: Mike Rapoport Introduce "memfd_secret" system call with the ability to create memory areas visible only in the context of the owning process and not mapped not only to other processes but in the kernel page tables as well. The user will create a file descriptor using the me

[PATCH v16 05/11] set_memory: allow querying whether set_direct_map_*() is actually enabled

2021-01-21 Thread Mike Rapoport
From: Mike Rapoport On arm64, set_direct_map_*() functions may return 0 without actually changing the linear map. This behaviour can be controlled using kernel parameters, so we need a way to determine at runtime whether calls to set_direct_map_invalid_noflush

[PATCH v16 09/11] PM: hibernate: disable when there are active secretmem users

2021-01-21 Thread Mike Rapoport
From: Mike Rapoport It is unsafe to allow saving of secretmem areas to the hibernation snapshot as they would be visible after the resume and this essentially will defeat the purpose of secret memory mappings. Prevent hibernation whenever there are active secret memory users. Signed-off

[PATCH v16 03/11] riscv/Kconfig: make direct map manipulation options depend on MMU

2021-01-21 Thread Mike Rapoport
From: Mike Rapoport ARCH_HAS_SET_DIRECT_MAP and ARCH_HAS_SET_MEMORY configuration options have no meaning when CONFIG_MMU is disabled and there is no point to enable them for the nommu case. Add an explicit dependency on MMU for these options. Signed-off-by: Mike Rapoport Reported-by: kernel

[PATCH v16 10/11] arch, mm: wire up memfd_secret system call where relevant

2021-01-21 Thread Mike Rapoport
From: Mike Rapoport Wire up memfd_secret system call on architectures that define ARCH_HAS_SET_DIRECT_MAP, namely arm64, risc-v and x86. Signed-off-by: Mike Rapoport Acked-by: Palmer Dabbelt Acked-by: Arnd Bergmann Cc: Alexander Viro Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Catalin

[PATCH v16 11/11] secretmem: test: add basic selftest for memfd_secret(2)

2021-01-21 Thread Mike Rapoport
From: Mike Rapoport The test verifies that file descriptor created with memfd_secret does not allow read/write operations, that secret memory mappings respect RLIMIT_MEMLOCK and that remote accesses with process_vm_read() and ptrace() to the secret memory fail. Signed-off-by: Mike Rapoport Cc

[PATCH v16 08/11] secretmem: add memcg accounting

2021-01-21 Thread Mike Rapoport
From: Mike Rapoport Account memory consumed by secretmem to memcg. The accounting is updated when the memory is actually allocated and freed. Signed-off-by: Mike Rapoport Acked-by: Roman Gushchin Reviewed-by: Shakeel Butt Cc: Alexander Viro Cc: Andy Lutomirski Cc: Arnd Bergmann Cc

[PATCH v16 07/11] secretmem: use PMD-size pages to amortize direct map fragmentation

2021-01-21 Thread Mike Rapoport
From: Mike Rapoport Removing a PAGE_SIZE page from the direct map every time such page is allocated for a secret memory mapping will cause severe fragmentation of the direct map. This fragmentation can be reduced by using PMD-size pages as a pool for small pages for secret memory mappings. Add

[PATCH v16 02/11] mmap: make mlock_future_check() global

2021-01-21 Thread Mike Rapoport
From: Mike Rapoport It will be used by the upcoming secret memory implementation. Signed-off-by: Mike Rapoport Cc: Alexander Viro Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christopher Lameter Cc: Dan Williams Cc: Dave Hansen Cc: David Hildenbrand

[PATCH v16 01/11] mm: add definition of PMD_PAGE_ORDER

2021-01-21 Thread Mike Rapoport
From: Mike Rapoport The definition of PMD_PAGE_ORDER denoting the number of base pages in the second-level leaf page is already used by DAX and maybe handy in other cases as well. Several architectures already have definition of PMD_ORDER as the size of second level page table, so to avoid

Re: [PATCH v6 2/2] iio: accel: Add support for the Bosch-Sensortec BMI088

2021-01-21 Thread Mike Looijmans
Comments inlined below. Met vriendelijke groet / kind regards, Mike Looijmans System Expert TOPIC Embedded Products B.V. Materiaalweg 4, 5681 RJ Best The Netherlands T: +31 (0) 499 33 69 69 E: mike.looijm...@topicproducts.com W: www.topicproducts.com Please consider the environment before

Re: [PATCH v6 1/2] dt-bindings: iio: accel: Add bmi088 accelerometer bindings

2021-01-21 Thread Mike Looijmans
Comments inlined below. Met vriendelijke groet / kind regards, Mike Looijmans System Expert TOPIC Embedded Products B.V. Materiaalweg 4, 5681 RJ Best The Netherlands T: +31 (0) 499 33 69 69 E: mike.looijm...@topicproducts.com W: www.topicproducts.com Please consider the environment before

Re: [PATCH v4 1/4] mm: rename memmap_init() and memmap_init_zone()

2021-01-21 Thread Mike Rapoport
start_pfn = clamp(start_pfn, range_start_pfn, > > range_end_pfn); > > 6268 end_pfn = clamp(end_pfn, range_start_pfn, > > range_end_pfn); > > 6269 > > 6270 if (end_pfn > start_pfn) { > > 6271 size = end_pfn - start_pfn; > > 6272 memmap_init_range(size, nid, zone, > > start_pfn, range_end_pfn, > > 6273 MEMINIT_EARLY, NULL, > > MIGRATE_MOVABLE); > > 6274 } > > 6275 } > > 6276 } > > 6277 > > > > --- > > 0-DAY CI Kernel Test Service, Intel Corporation > > https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org > > -- Sincerely yours, Mike.

Re: [PATCH v2 2/5] hugetlb: convert page_huge_active() HPageMigratable flag

2021-01-20 Thread Mike Kravetz
On 1/20/21 2:00 AM, Oscar Salvador wrote: > On Wed, Jan 20, 2021 at 10:59:05AM +0100, Oscar Salvador wrote: >> On Tue, Jan 19, 2021 at 05:30:46PM -0800, Mike Kravetz wrote: >>> Use the new hugetlb page specific flag HPageMigratable to replace the >>> page_huge_activ

Re: [PATCH v15 06/11] mm: introduce memfd_secret system call to create "secret" memory areas

2021-01-20 Thread Mike Rapoport
On Wed, Jan 20, 2021 at 08:35:04PM +, Matthew Wilcox wrote: > On Wed, Jan 20, 2021 at 08:06:07PM +0200, Mike Rapoport wrote: > > +static struct page *secretmem_alloc_page(gfp_t gfp) > > +{ > > + /* > > +* FIXME: use a cache of large pages to reduce the direct m

Re: [PATCH v2 4/5] hugetlb: convert PageHugeTemporary() to HPageTemporary flag

2021-01-20 Thread Mike Kravetz
On 1/20/21 2:09 AM, Oscar Salvador wrote: > On Tue, Jan 19, 2021 at 05:30:48PM -0800, Mike Kravetz wrote: >> Use new hugetlb specific HPageTemporary flag to replace the >> PageHugeTemporary() interfaces. >> >> Signed-off-by: Mike Kravetz > > I would have add

[PATCH v15 02/11] mmap: make mlock_future_check() global

2021-01-20 Thread Mike Rapoport
From: Mike Rapoport It will be used by the upcoming secret memory implementation. Signed-off-by: Mike Rapoport Cc: Alexander Viro Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christopher Lameter Cc: Dan Williams Cc: Dave Hansen Cc: David Hildenbrand

Re: [PATCH v2 1/5] hugetlb: use page.private for hugetlb specific page flags

2021-01-20 Thread Mike Kravetz
On 1/20/21 1:30 AM, Oscar Salvador wrote: > On Tue, Jan 19, 2021 at 05:30:45PM -0800, Mike Kravetz wrote: >> + * Macros to create test, set and clear function definitions for >> + * hugetlb specific page flags. >> + */ >> +#ifdef CONFIG_HUGETLB_PAGE >> +#d

[PATCH v15 01/11] mm: add definition of PMD_PAGE_ORDER

2021-01-20 Thread Mike Rapoport
From: Mike Rapoport The definition of PMD_PAGE_ORDER denoting the number of base pages in the second-level leaf page is already used by DAX and maybe handy in other cases as well. Several architectures already have definition of PMD_ORDER as the size of second level page table, so to avoid

[PATCH v15 08/11] secretmem: add memcg accounting

2021-01-20 Thread Mike Rapoport
From: Mike Rapoport Account memory consumed by secretmem to memcg. The accounting is updated when the memory is actually allocated and freed. Signed-off-by: Mike Rapoport Acked-by: Roman Gushchin Reviewed-by: Shakeel Butt Cc: Alexander Viro Cc: Andy Lutomirski Cc: Arnd Bergmann Cc

[PATCH v15 07/11] secretmem: use PMD-size pages to amortize direct map fragmentation

2021-01-20 Thread Mike Rapoport
From: Mike Rapoport Removing a PAGE_SIZE page from the direct map every time such page is allocated for a secret memory mapping will cause severe fragmentation of the direct map. This fragmentation can be reduced by using PMD-size pages as a pool for small pages for secret memory mappings. Add

[PATCH v15 03/11] riscv/Kconfig: make direct map manipulation options depend on MMU

2021-01-20 Thread Mike Rapoport
From: Mike Rapoport ARCH_HAS_SET_DIRECT_MAP and ARCH_HAS_SET_MEMORY configuration options have no meaning when CONFIG_MMU is disabled and there is no point to enable them for the nommu case. Add an explicit dependency on MMU for these options. Signed-off-by: Mike Rapoport Reported-by: kernel

[PATCH v15 06/11] mm: introduce memfd_secret system call to create "secret" memory areas

2021-01-20 Thread Mike Rapoport
From: Mike Rapoport Introduce "memfd_secret" system call with the ability to create memory areas visible only in the context of the owning process and not mapped not only to other processes but in the kernel page tables as well. The user will create a file descriptor using the me

<    5   6   7   8   9   10   11   12   13   14   >