Re: [PATCH RFC v2 16/27] arm64: mte: Manage tag storage on page allocation

2023-12-07 Thread Hyesoo Yu
Hi. On Wed, Nov 29, 2023 at 01:33:37PM +, Alexandru Elisei wrote: > Hi, > > On Wed, Nov 29, 2023 at 06:10:40PM +0900, Hyesoo Yu wrote: > > On Sun, Nov 19, 2023 at 04:57:10PM +, Alexandru Elisei wrote: > > > [..] > > > +static int order_to_num_blocks(int o

Re: [PATCH RFC v2 15/27] arm64: mte: Check that tag storage blocks are in the same zone

2023-12-07 Thread Hyesoo Yu
Hi~ On Thu, Nov 30, 2023 at 12:00:11PM +, Alexandru Elisei wrote: > Hi, > > On Wed, Nov 29, 2023 at 05:57:44PM +0900, Hyesoo Yu wrote: > > On Sun, Nov 19, 2023 at 04:57:09PM +, Alexandru Elisei wrote: > > > alloc_contig_range() requires that the requested pages ar

Re: [PATCH RFC v2 11/27] arm64: mte: Reserve tag storage memory

2023-12-07 Thread Hyesoo Yu
Hi, I'm sorry for the late response, I was on vacation. On Sun, Dec 03, 2023 at 12:14:30PM +, Alexandru Elisei wrote: > Hi, > > On Wed, Nov 29, 2023 at 05:44:24PM +0900, Hyesoo Yu wrote: > > Hello. > > > > On Sun, Nov 19, 2023 at 04:57:05PM +, Alexand

Re: [PATCH RFC v2 19/27] mm: mprotect: Introduce PAGE_FAULT_ON_ACCESS for mprotect(PROT_MTE)

2023-11-29 Thread Hyesoo Yu
On Sun, Nov 19, 2023 at 04:57:13PM +, Alexandru Elisei wrote: > To enable tagging on a memory range, userspace can use mprotect() with the > PROT_MTE access flag. Pages already mapped in the VMA don't have the > associated tag storage block reserved, so mark the PTEs as > PAGE_FAULT_ON_ACCESS t

Re: [PATCH RFC v2 16/27] arm64: mte: Manage tag storage on page allocation

2023-11-29 Thread Hyesoo Yu
On Sun, Nov 19, 2023 at 04:57:10PM +, Alexandru Elisei wrote: > Reserve tag storage for a tagged page by migrating the contents of the tag > storage (if in use for data) and removing the tag storage pages from the > page allocator by calling alloc_contig_range(). > > When all the associated ta

Re: [PATCH RFC v2 15/27] arm64: mte: Check that tag storage blocks are in the same zone

2023-11-29 Thread Hyesoo Yu
On Sun, Nov 19, 2023 at 04:57:09PM +, Alexandru Elisei wrote: > alloc_contig_range() requires that the requested pages are in the same > zone. Check that this is indeed the case before initializing the tag > storage blocks. > > Signed-off-by: Alexandru Elisei > --- > arch/arm64/kernel/mte_ta

Re: [PATCH RFC v2 11/27] arm64: mte: Reserve tag storage memory

2023-11-29 Thread Hyesoo Yu
Hello. On Sun, Nov 19, 2023 at 04:57:05PM +, Alexandru Elisei wrote: > Allow the kernel to get the size and location of the MTE tag storage > regions from the DTB. This memory is marked as reserved for now. > > The DTB node for the tag storage region is defined as: > > tags0: tag-sto

Re: [PATCH RFC 00/37] Add support for arm64 MTE dynamic tag storage reuse

2023-10-25 Thread Hyesoo Yu
On Wed, Oct 25, 2023 at 09:47:36AM +0100, Alexandru Elisei wrote: > Hi, > > On Wed, Oct 25, 2023 at 11:59:32AM +0900, Hyesoo Yu wrote: > > On Wed, Sep 13, 2023 at 04:29:25PM +0100, Catalin Marinas wrote: > > > On Mon, Sep 11, 2023 at 02:29:03PM +0200, David Hildenbrand wr

Re: [PATCH RFC 00/37] Add support for arm64 MTE dynamic tag storage reuse

2023-10-24 Thread Hyesoo Yu
On Wed, Sep 13, 2023 at 04:29:25PM +0100, Catalin Marinas wrote: > On Mon, Sep 11, 2023 at 02:29:03PM +0200, David Hildenbrand wrote: > > On 11.09.23 13:52, Catalin Marinas wrote: > > > On Wed, Sep 06, 2023 at 12:23:21PM +0100, Alexandru Elisei wrote: > > > > On Thu, Aug 24, 2023 at 04:24:30PM +010

Re: [PATCH RFC 04/37] mm: Add MIGRATE_METADATA allocation policy

2023-10-23 Thread Hyesoo Yu
On Mon, Oct 16, 2023 at 01:40:39PM +0100, Alexandru Elisei wrote: > Hello, > > On Thu, Oct 12, 2023 at 10:28:24AM +0900, Hyesoo Yu wrote: > > On Wed, Aug 23, 2023 at 02:13:17PM +0100, Alexandru Elisei wrote: > > > Some architectures implement hardware memory col

Re: [PATCH RFC 17/37] arm64: mte: Disable dynamic tag storage management if HW KASAN is enabled

2023-10-11 Thread Hyesoo Yu
disabling tag storage"); > + return 0; > + } > + Hi. Is there no plan to enable HW KASAN in the current design ? I wonder if dynamic MTE is only used for user ? Thanks, Hyesoo Yu. > for (i = 0; i < num_tag_regions; i++) { > tag

Re: [PATCH RFC 04/37] mm: Add MIGRATE_METADATA allocation policy

2023-10-11 Thread Hyesoo Yu
+ * Allocate data pages from MIGRATE_METADATA only if the regular > + * allocation path fails to increase the chance that the > + * metadata page is available when the associated data page > +

Re: [PATCH RFC 06/37] mm: page_alloc: Allocate from movable pcp lists only if ALLOC_FROM_METADATA

2023-10-11 Thread Hyesoo Yu
being in the pcp list because metadata pages is bypassed when freeing pages. The allocation performance of most movable pages is likely to decrease if only the request with ALLOC_FROM_METADATA could be allocated. How about not including metadata pages in the pcp list at all ?

Re: [PATCH v3 4/4] dma-buf: heaps: add chunk heap to dmabuf heaps

2021-01-19 Thread Hyesoo Yu
On Tue, Jan 19, 2021 at 12:36:40PM -0800, Minchan Kim wrote: > On Tue, Jan 19, 2021 at 10:29:29AM -0800, John Stultz wrote: > > On Tue, Jan 12, 2021 at 5:22 PM Minchan Kim wrote: > > > > > > From: Hyesoo Yu > > > > > > This patch supports chunk heap t

Re: [PATCH 4/4] dma-heap: Devicetree binding for chunk heap

2020-11-18 Thread Hyesoo Yu
On Wed, Nov 18, 2020 at 07:19:07PM -0800, John Stultz wrote: > On Wed, Nov 18, 2020 at 5:22 PM Hyesoo Yu wrote: > > > > On Tue, Nov 17, 2020 at 07:00:54PM -0800, John Stultz wrote: > > > So I suspect Rob will push back on this as he has for other dt > > > bindin

Re: [PATCH 3/4] dma-buf: heaps: add chunk heap to dmabuf heaps

2020-11-18 Thread Hyesoo Yu
Hello, Hillf danton. On Wed, Nov 18, 2020 at 05:00:13PM +0800, Hillf Danton wrote: > On Tue, 17 Nov 2020 10:19:34 -0800 Minchan Kim wrote: > + > +static int chunk_heap_mmap(struct dma_buf *dmabuf, struct vm_area_struct > *vma) > +{ > + struct chunk_heap_buffer *buffer = dmabuf->priv; > +

Re: [PATCH 4/4] dma-heap: Devicetree binding for chunk heap

2020-11-18 Thread Hyesoo Yu
On Tue, Nov 17, 2020 at 07:00:54PM -0800, John Stultz wrote: > On Tue, Nov 17, 2020 at 10:19 AM Minchan Kim wrote: > > > > From: Hyesoo Yu > > > > Document devicetree binding for chunk heap on dma heap framework > > > > Signed-off-by: Hy

Re: [PATCH 3/3] dma-heap: Devicetree binding for chunk heap

2020-08-21 Thread Hyesoo Yu
Hi, On Tue, Aug 18, 2020 at 10:48:12AM -0600, Rob Herring wrote: > On Tue, 18 Aug 2020 17:04:15 +0900, Hyesoo Yu wrote: > > Document devicetree binding for chunk heap on dma heap framework > > > > Signed-off-by: Hyesoo Yu > > --- > > .../devicetree/binding

[PATCH 2/3] dma-buf: heaps: add chunk heap to dmabuf heaps

2020-08-18 Thread Hyesoo Yu
This patch adds support for a chunk heap that allows for buffers that are made up of a list of fixed size chunks taken from a CMA. Chunk sizes are configuratd when the heaps are created. Signed-off-by: Hyesoo Yu --- drivers/dma-buf/heaps/Kconfig | 9 ++ drivers/dma-buf/heaps/Makefile

[PATCH 3/3] dma-heap: Devicetree binding for chunk heap

2020-08-18 Thread Hyesoo Yu
Document devicetree binding for chunk heap on dma heap framework Signed-off-by: Hyesoo Yu --- .../devicetree/bindings/dma-buf/chunk_heap.yaml| 46 ++ 1 file changed, 46 insertions(+) create mode 100644 Documentation/devicetree/bindings/dma-buf/chunk_heap.yaml diff

[PATCH 0/3] Chunk Heap Support on DMA-HEAP

2020-08-18 Thread Hyesoo Yu
ister chunk heap Hyesoo Yu (3): dma-buf: add missing EXPORT_SYMBOL_GPL() for dma heaps dma-buf: heaps: add chunk heap to dmabuf heaps dma-heap: Devicetree binding for chunk heap .../devicetree/bindings/dma-buf/chunk_heap.yaml| 46 + drivers/dma-buf/dma-heap.c

[PATCH 1/3] dma-buf: add missing EXPORT_SYMBOL_GPL() for dma heaps

2020-08-18 Thread Hyesoo Yu
The interface of dma heap is used from kernel module to register dma heaps, otherwize we will get compile error. Signed-off-by: Hyesoo Yu --- drivers/dma-buf/dma-heap.c | 2 ++ drivers/dma-buf/heaps/heap-helpers.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/dma-buf

[PATCH] dma-buf: support to walk the list of dmabuf for debug

2020-06-12 Thread Hyesoo Yu
d function implemented from exporter. That helps to show exporter detail information. For example, ION may show the buffer flag, heap name, or the name of process to request allocation. Change-Id: I670f04dda4a0870081e1b0fd96b9185b48b9dd15 Signed-off-by: Hyesoo Yu --- drivers/dma-buf/dma-

[PATCH] dma-buf: support to walk the list of dmabuf for debug

2020-06-11 Thread Hyesoo Yu
d function implemented from exporter. That helps to show exporter detail information. For example, ION may show the buffer flag, heap name, or the name of process to request allocation. Change-Id: I670f04dda4a0870081e1b0fd96b9185b48b9dd15 Signed-off-by: Hyesoo Yu --- drivers/dma-buf/dma-