Re: [PATCH v2 4/4] eventfd: make eventfd_signal{_mask}() void

2023-11-22 Thread Jan Kara
On Wed 22-11-23 13:48:25, Christian Brauner wrote: > No caller care about the return value. > > Signed-off-by: Christian Brauner Yup. Feel free to add: Reviewed-by: Jan Kara Honza > --- > fs/eventfd.c

Re: [PATCH v2 3/4] eventfd: simplify eventfd_signal_mask()

2023-11-22 Thread Jan Kara
add: Reviewed-by: Jan Kara Honza > --- > fs/eventfd.c| 7 --- > include/linux/eventfd.h | 5 ++--- > io_uring/io_uring.c | 4 ++-- > 3 files changed, 8 insertions(+), 8 deletions(-) > > diff

Re: [PATCH v2 2/4] eventfd: simplify eventfd_signal()

2023-11-22 Thread Jan Kara
at additional argument. > > Signed-off-by: Christian Brauner Looks good. Feel free to add: Reviewed-by: Jan Kara Honza > --- > arch/x86/kvm/hyperv.c | 2 +- > arch/x86/kvm/xen.c

Re: [PATCH v2 1/4] i915: make inject_virtual_interrupt() void

2023-11-22 Thread Jan Kara
On Wed 22-11-23 13:48:22, Christian Brauner wrote: > The single caller of inject_virtual_interrupt() ignores the return value > anyway. This allows us to simplify eventfd_signal() in follow-up > patches. > > Signed-off-by: Christian Brauner Looks good. Feel free to add: Review

Re: [PATCH v2] fs: clean up usage of noop_dirty_folio

2023-08-28 Thread Jan Kara
: Xueshi Hu Looks good to me. Feel free to add: Reviewed-by: Jan Kara Honza > --- > Changes in v2: > - make noop_dirty_folio() inline as suggested by Matthew > - v1: > https://lore.kernel.org/li

Re: [PATCH] fs: clean up usage of noop_dirty_folio

2023-08-21 Thread Jan Kara
Xueshi Hu Yeah, looks sensible to me but for some callbacks we are oscilating between all users having to provide some callback and providing some default behavior for NULL callback. I don't have a strong opinion either way so feel free to add: Reviewed-by: Jan Kara But I guess let's see w

Re: [PATCH 09/10] udf: Replace license notice with SPDX identifier

2023-05-12 Thread Jan Kara
ARRANTY; without even the implied warranty of > - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > - Library General Public License for more details. > - > - You should have received a copy of the GNU Library General Public > - License along with the GNU C Library; see the file COPYING.LIB. If not, > - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, > - Boston, MA 02111-1307, USA. */ > +/* SPDX-License-Identifier: GPL-2.0-only */ > > /* > * dgb 10/02/98: ripped this from glibc source to help convert timestamps > diff --git a/fs/udf/unicode.c b/fs/udf/unicode.c > index 622569007b530b..5d6b66e15fcded 100644 > --- a/fs/udf/unicode.c > +++ b/fs/udf/unicode.c > @@ -1,3 +1,4 @@ > +/* SPDX-License-Identifier: GPL-2.0-only */ > /* > * unicode.c > * > @@ -11,11 +12,6 @@ > * UTF-8 is explained in the IETF RFC . > * ftp://ftp.internic.net/rfc/rfc.txt > * > - * COPYRIGHT > - * This file is distributed under the terms of the GNU General Public > - * License (GPL). Copies of the GPL can be obtained from: > - * ftp://prep.ai.mit.edu/pub/gnu/GPL > - * Each contributing author retains all rights to their own work. > */ > > #include "udfdecl.h" > -- > An old man doll... just what I always wanted! - Clara > -- Jan Kara SUSE Labs, CR

Re: [PATCH v2 3/5] treewide: use get_random_u32() when possible

2022-10-06 Thread Jan Kara
eal function. > > Reviewed-by: Kees Cook > Signed-off-by: Jason A. Donenfeld Looks good. Feel free to add: Reviewed-by: Jan Kara for the ext4 bits. Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH v2 1/5] treewide: use prandom_u32_max() when possible

2022-10-06 Thread Jan Kara
d-by: Kees Cook > Reviewed-by: KP Singh > Reviewed-by: Christoph Böhmwalder > Signed-off-by: Jason A. Donenfeld Feel free to add: Reviewed-by: Jan Kara for the ext2, ext4, and lib/sbitmap.c bits. Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH v1 3/5] treewide: use get_random_u32() when possible

2022-10-06 Thread Jan Kara
bly we didn't want to use modulo here because EXT4_MMP_SEQ_MAX is rather big and so the resulting 'new_seq' would be seriously non-uniform. Honza -- Jan Kara SUSE Labs, CR

Re: Report 2 in ext4 and journal based on v5.17-rc1

2022-03-03 Thread Jan Kara
On Thu 03-03-22 10:00:33, Byungchul Park wrote: > On Mon, Feb 28, 2022 at 11:14:44AM +0100, Jan Kara wrote: > > On Mon 28-02-22 18:28:26, Byungchul Park wrote: > > > case 1. Code with an actual circular dependency, but not deadlock. > > > > > >A circular

Re: Report 2 in ext4 and journal based on v5.17-rc1

2022-02-28 Thread Jan Kara
On Mon 28-02-22 18:28:26, Byungchul Park wrote: > On Thu, Feb 24, 2022 at 11:22:39AM +0100, Jan Kara wrote: > > On Thu 24-02-22 10:11:02, Byungchul Park wrote: > > > On Wed, Feb 23, 2022 at 03:48:59PM +0100, Jan Kara wrote: > > > > > KJOURNALD2(kthread) TASK1(k

Re: Report 2 in ext4 and journal based on v5.17-rc1

2022-02-24 Thread Jan Kara
On Thu 24-02-22 10:11:02, Byungchul Park wrote: > On Wed, Feb 23, 2022 at 03:48:59PM +0100, Jan Kara wrote: > > > KJOURNALD2(kthread) TASK1(ksys_write) TASK2(ksys_write) > > > > > > wait A > > > --- stuck > > >

Re: Report 2 in ext4 and journal based on v5.17-rc1

2022-02-23 Thread Jan Kara
On Wed 23-02-22 09:35:34, Byungchul Park wrote: > On Mon, Feb 21, 2022 at 08:02:04PM +0100, Jan Kara wrote: > > On Thu 17-02-22 20:10:04, Byungchul Park wrote: > > > [9.008161] === > > > [9.008163] DEPT: Circular d

Re: Report 1 in ext4 and journal based on v5.17-rc1

2022-02-22 Thread Jan Kara
the block is used for). Similarly how we e.g. annotate i_rwsem for different inodes. Honza -- Jan Kara SUSE Labs, CR

Re: Report 2 in ext4 and journal based on v5.17-rc1

2022-02-21 Thread Jan Kara
6/include/asm/current.h:15 > kernel/dependency/dept.c:241 kernel/dependency/dept.c:999 > kernel/dependency/dept.c:1043 kernel/dependency/dept.c:1843) > [9.008389] ? _raw_spin_unlock_irqrestore > (./arch/x86/include/asm/irqflags.h:45 ./arch/x86/include/asm/irqflags.h:80 > ./

Re: [PATCH v2 4/8] ocfs2: simplify subdirectory registration with register_sysctl()

2021-11-24 Thread Jan Kara
subdir-register-sysctl-simplify.cocci PATH Heh, nice example of using Coccinelle. The result looks good. Feel free to add: Reviewed-by: Jan Kara Honza > > @c1@ > expression E1; > identifier subdir, sysctls; > @@ >

Re: [PATCH v2 6/8] inotify: simplify subdirectory registration with register_sysctl()

2021-11-24 Thread Jan Kara
er = proc_dointvec, > }, > #endif > -#ifdef CONFIG_INOTIFY_USER > - { > - .procname = "inotify", > - .mode = 0555, > - .child = inotify_table, > - }, > -#endif > -#ifdef CONFIG_FANOTIFY > - { > - .procname = "fanotify", > - .mode = 0555, > - .child = fanotify_table, > - }, > -#endif > #ifdef CONFIG_EPOLL > { > .procname = "epoll", > -- > 2.33.0 > -- Jan Kara SUSE Labs, CR

Re: [PATCH 2/2] mm/frame-vec: use FOLL_LONGTERM

2020-10-05 Thread Jan Kara
the loop (to out: label) anyway due to the loop termination condition and why not return the frames we already have? Furthermore find_vma_intersection() can return NULL which would oops in your check then. What am I missing? Honza > out: >

Re: [PATCH 2/2] mm/frame-vec: use FOLL_LONGTERM

2020-10-05 Thread Jan Kara
sed to work. Anyway, if you can make this go away, sure go ahead :) Honza -- Jan Kara SUSE Labs, CR ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v11 00/25] mm/gup: track dma-pinned pages: FOLL_PIN

2020-01-06 Thread Jan Kara
at's too much trouble, then I'd have to fall back to submitting a few >patches at a time and working my way up to the tracking patch... It could also be that an ordinary page reference is dropped with 'unpin' thus underflowing the page refcount... Honza -- Jan Kara SUSE Labs, CR ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v11 00/25] mm/gup: track dma-pinned pages: FOLL_PIN

2019-12-20 Thread Jan Kara
think making all GUP users huge page aware is realistic (effort-wise) or even wanted (maintenance overhead in all those places). I believe there might be also a different solution for this: For transparent huge pages, we could find a space in 'struct page' of the second page in the huge p

Re: [PATCH v11 00/25] mm/gup: track dma-pinned pages: FOLL_PIN

2019-12-16 Thread Jan Kara
ider testing exposure and is prepared for the next merge window. Honza -- Jan Kara SUSE Labs, CR ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v11 23/25] mm/gup: track FOLL_PIN pages

2019-12-16 Thread Jan Kara
On Mon 16-12-19 14:18:59, John Hubbard wrote: > On 12/16/19 4:53 AM, Jan Kara wrote: > > With this fixed, the patch looks good to me so you can then add: > > > > Reviewed-by: Jan Kara > > > >

Re: [PATCH v11 23/25] mm/gup: track FOLL_PIN pages

2019-12-16 Thread Jan Kara
d get_user_pages() (LPC: Dec 12, 2018): > https://lwn.net/Articles/774411/ > [3] The trouble with get_user_pages() (Apr 30, 2018): > https://lwn.net/Articles/753027/ > > Suggested-by: Jan Kara > Suggested-by: Jérôme Glisse > Cc: Kirill A. Shutemov > Signed-off-b

Re: [PATCH v10 23/25] mm/gup: track FOLL_PIN pages

2019-12-12 Thread Jan Kara
d get_user_pages() (LPC: Dec 12, 2018): > https://lwn.net/Articles/774411/ > [3] The trouble with get_user_pages() (Apr 30, 2018): > https://lwn.net/Articles/753027/ > > Suggested-by: Jan Kara > Suggested-by: Jérôme Glisse > Cc: Kirill A. Shutemov > Signed-off-by

Re: [PATCH v9 23/25] mm/gup: track FOLL_PIN pages

2019-12-11 Thread Jan Kara
d get_user_pages() (LPC: Dec 12, 2018): > https://lwn.net/Articles/774411/ > [3] The trouble with get_user_pages() (Apr 30, 2018): > https://lwn.net/Articles/753027/ The patch looks mostly good to me now. Just a few smaller comments below. > Suggested-by: Jan Kara > Suggested

Re: [PATCH v9 20/25] powerpc: book3s64: convert to pin_user_pages() and put_user_page()

2019-12-11 Thread Jan Kara
On Tue 10-12-19 18:53:13, John Hubbard wrote: > 1. Convert from get_user_pages() to pin_user_pages(). > > 2. As required by pin_user_pages(), release these pages via > put_user_page(). > > Cc: Jan Kara > Signed-off-by: John Hubbard The patch looks good to me. You can a

Re: [PATCH v8 24/26] mm/gup: track FOLL_PIN pages

2019-12-10 Thread Jan Kara
d get_user_pages() (LPC: Dec 12, 2018): > https://lwn.net/Articles/774411/ > [3] The trouble with get_user_pages() (Apr 30, 2018): > https://lwn.net/Articles/753027/ > > Suggested-by: Jan Kara > Suggested-by: Jérôme Glisse > Signed-off-by: John Hubbard Looks nice,

Re: [PATCH v8 23/26] mm/gup: pass flags arg to __gup_device_* functions

2019-12-10 Thread Jan Kara
his into the patch the uses > the gup flags arguments. You should probably implement this TODO? :) Honza > > Reviewed-by: Jan Kara > Reviewed-by: Jérôme Glisse > Reviewed-by: Ira Weiny > Cc: Kirill A. Shu

Re: [PATCH v8 17/26] media/v4l2-core: set pages dirty upon releasing DMA buffers

2019-12-10 Thread Jan Kara
e the video HW stored data in the page) and the page then gets evicted from the page cache. Honza -- Jan Kara SUSE Labs, CR ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v8 08/26] mm/gup: allow FOLL_FORCE for get_user_pages_fast()

2019-12-10 Thread Jan Kara
RN_ON_ONCE(gup_flags & ~(FOLL_WRITE | FOLL_LONGTERM))) > + if (WARN_ON_ONCE(gup_flags & ~(FOLL_WRITE | FOLL_LONGTERM | > + FOLL_FORCE))) > return -EINVAL; > > start = untagged_addr(start) & PAGE_MASK; > -- > 2.24.0 > -- Jan Kara SUSE Labs,

Re: [PATCH v2 17/19] powerpc: book3s64: convert to pin_user_pages() and put_user_page()

2019-11-29 Thread Jan Kara
e reference on the inode it > hangs off." [1] > > [1] https://lore.kernel.org/r/20190723153640.gb...@lst.de > > Cc: Jan Kara > Signed-off-by: John Hubbard > --- > arch/powerpc/mm/book3s64/iommu_api.c | 12 +--- > 1 file changed, 5 insertions(+), 7 delet

Re: [PATCH 17/19] powerpc: book3s64: convert to pin_user_pages() and put_user_page()

2019-11-25 Thread Jan Kara
ageDirty(page); > + put_user_pages_dirty_lock(>hpages[i], 1, > + MM_IOMMU_TABLE_GROUP_PAGE_DIRTY); And the dirtying condition is wrong here as well. Currently it is always true. Honza -- Jan Kara SUSE Labs, CR ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v7 02/24] mm/gup: factor out duplicate code from four routines

2019-11-22 Thread Jan Kara
On Thu 21-11-19 18:54:02, John Hubbard wrote: > On 11/21/19 1:54 AM, Jan Kara wrote: > > On Thu 21-11-19 00:29:59, John Hubbard wrote: > > > > > > > > Otherwise this looks fine and might be a worthwhile cleanup to feed > > > > Andrew

Re: [PATCH v7 02/24] mm/gup: factor out duplicate code from four routines

2019-11-21 Thread Jan Kara
with), it would probably make sense to push also the put_user_pages() -> unpin_user_pages() renaming so that that inconsistency in naming does not exist in the released upstream kernel. Honza -- Jan Kara SUSE Labs, CR ___

Re: [PATCH v7 02/24] mm/gup: factor out duplicate code from four routines

2019-11-21 Thread Jan Kara
ecause ideally in 4 weeks we should have them ready with all the reviews so that they can be picked up and integrated into linux-next. Honza -- Jan Kara SUSE Labs, CR ___ dri-devel maili

Re: [PATCH v7 17/24] mm/gup: track FOLL_PIN pages

2019-11-21 Thread Jan Kara
ser_pages() (LPC: Dec 12, 2018): > https://lwn.net/Articles/774411/ > [3] The trouble with get_user_pages() (Apr 30, 2018): > https://lwn.net/Articles/753027/ > > Suggested-by: Jan Kara > Suggested-by: Jérôme Glisse > Signed-off-by: Jo

Re: [PATCH v6 24/24] mm, tree-wide: rename put_user_page*() to unpin_user_page*()

2019-11-19 Thread Jan Kara
igned-off-by: John Hubbard Looks good to me. You can add: Reviewed-by: Jan Kara Honza > --- > Documentation/core-api/pin_user_pages.rst | 2 +- > arch/powerpc/mm/book3s64/iommu_api.c| 6 +-- > drivers/gpu/drm/vi

Re: [PATCH v6 17/24] mm/gup: track FOLL_PIN pages

2019-11-19 Thread Jan Kara
gs) doing if (flags & FOLL_GET) get_page(page); else if (flags & FOLL_PIN) return try_pin_page(page); return true; Otherwise the patch looks good to me now. Honza -- Jan Kara

Re: [PATCH v6 02/24] mm/gup: factor out duplicate code from four routines

2019-11-19 Thread Jan Kara
unded > by get_page()/put_page(). > > Also, further simplify (slightly), by waiting until the the successful > end of each routine, to increment *nr. > > Reviewed-by: Jérôme Glisse > Cc: Jan Kara > Cc: Ira Weiny > Cc: Christoph Hellwig > Cc: Aneesh Kumar K.V >

Re: [PATCH v5 07/24] IB/umem: use get_user_pages_fast() to pin DMA pages

2019-11-18 Thread Jan Kara
ewed-by: Ira Weiny > Signed-off-by: John Hubbard Looks good to me. You can add: Reviewed-by: Jan Kara Honza > --- > drivers/infiniband/core/umem.c | 17 ++--- > 1 file changed, 6 insertions(+), 11 deletion

Re: [PATCH v5 06/24] goldish_pipe: rename local pin_user_pages() routine

2019-11-18 Thread Jan Kara
: Jérôme Glisse > Reviewed-by: Ira Weiny > Signed-off-by: John Hubbard Looks good to me. You can add: Reviewed-by: Jan Kara Honza > --- > drivers/platform/goldfish/goldfish_pipe.c | 18 +- > 1 file

Re: [PATCH v5 02/24] mm/gup: factor out duplicate code from four routines

2019-11-18 Thread Jan Kara
unded > by get_page()/put_page(). > > Also, further simplify (slightly), by waiting until the the successful > end of each routine, to increment *nr. > > Reviewed-by: Jérôme Glisse > Cc: Jan Kara > Cc: Ira Weiny > Cc: Christoph Hellwig > Cc: Aneesh Kuma

Re: [PATCH v5 11/24] goldish_pipe: convert to pin_user_pages() and put_user_page()

2019-11-18 Thread Jan Kara
723153640.gb...@lst.de > > Reviewed-by: Ira Weiny > Signed-off-by: John Hubbard Looks good to me. You can add: Reviewed-by: Jan Kara Honza > --- > drivers/platform/goldfish/goldfish_pipe.c | 17 +++-

Re: [PATCH v5 13/24] mm/process_vm_access: set FOLL_PIN via pin_user_pages_remote()

2019-11-18 Thread Jan Kara
> 1 file changed, 15 insertions(+), 13 deletions(-) The patch looks good to me. You can add: Reviewed-by: Jan Kara Honza -- Jan Kara SUSE Labs, CR ___ dri-devel mailing l

Re: [PATCH v5 15/24] fs/io_uring: set FOLL_PIN via pin_user_pages()

2019-11-18 Thread Jan Kara
user_pages() to pin_user_pages(). > > Signed-off-by: John Hubbard Looks good to me. You can add: Reviewed-by: Jan Kara Honza > --- > fs/io_uring.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >

Re: [PATCH v5 10/24] mm/gup: introduce pin_user_pages*() and FOLL_PIN

2019-11-18 Thread Jan Kara
ere usages which are transient. ^^^ when you touch this, please fix also the second sentense. It doesn't quite make sense to me... I'd probably write there "whose usages are transient" but maybe you can come up with something even better. Otherwise the patch looks good to me so

Re: [PATCH v5 17/24] mm/gup: track FOLL_PIN pages

2019-11-18 Thread Jan Kara
is left to later > patchsets. There is discussion about this in [1]. ^^ missing this reference in the changelog... > This also changes a BUG_ON(), to a WARN_ON(), in follow_page_mask(). > > Suggested-by: Jan Kara > Suggested-by:

Re: [PATCH v4 02/23] mm/gup: factor out duplicate code from four routines

2019-11-13 Thread Jan Kara
SetPageReferenced(head); > +} I don't find this last helper very useful. It seems to muddy water more than necessary... Other than that the cleanup looks nice to me. Honza -- Jan Kara SUSE Labs, CR ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v4 03/23] mm/gup: move try_get_compound_head() to top, fix minor issues

2019-11-13 Thread Jan Kara
On Tue 12-11-19 20:26:50, John Hubbard wrote: > An upcoming patch uses try_get_compound_head() more widely, > so move it to the top of gup.c. > > Also fix a tiny spelling error and a checkpatch.pl warning. > > Signed-off-by: John Hubbard Looks good. You can add: Rev

Re: [PATCH v4 01/23] mm/gup: pass flags arg to __gup_device_* functions

2019-11-13 Thread Jan Kara
ewed-by: Ira Weiny > Cc: Kirill A. Shutemov > Signed-off-by: John Hubbard Looks good! You can add: Reviewed-by: Jan Kara Honza > --- > mm/gup.c | 28 ++-- > 1 file changed, 18 insertions(+

Re: [PATCH v4 04/23] mm: devmap: refactor 1-based refcounting for ZONE_DEVICE pages

2019-11-13 Thread Jan Kara
periments. > Since then, Jérôme Glisse suggested the refactoring described above. > > Suggested-by: Jérôme Glisse > Signed-off-by: Ira Weiny > Signed-off-by: John Hubbard Looks good to me. You can add: Reviewed-by: Jan Kara

Re: [PATCH v4 09/23] mm/gup: introduce pin_user_pages*() and FOLL_PIN

2019-11-13 Thread Jan Kara
acteristics, should call a > get_user_pages()-like wrapper call that sets FOLL_PIN. These wrappers > will: > * Start with "pin_user_pages" instead of "get_user_pages". That > makes it easy to find and audit the call sites. > * Set FOLL_PIN >

Re: [PATCH v3 00/23] mm/gup: track dma-pinned pages: FOLL_PIN, FOLL_LONGTERM

2019-11-13 Thread Jan Kara
ed off with a proposal that avoids changing the > names of put_user_page*() APIs). But OTOH, the amount of churn is proportional > to the change in direction here, and it's really only 10 or 20 lines changed, > in the end. > > So I'm open to changing to that naming. It would be nice to hear what others > prefer, too... FWIW I'd find unpin_user_page() also better than put_user_page() as a counterpart to pin_user_pages(). Honza -- Jan Kara SUSE Labs, CR ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH 00/34] put_user_pages(): miscellaneous call sites

2019-08-09 Thread Jan Kara
, rdma, ext4, and xfs. MM tree would be one candidate for routing but there are other options that would make sense as well - Dan's tree, VFS tree, or even I can pickup the patches to my tree if needed. But let's worry about the routing after we have working and reviewed patches...

Re: [PATCH 00/34] put_user_pages(): miscellaneous call sites

2019-08-09 Thread Jan Kara
t; pretty bad... So Thanks Jan... ;-) For your function, I'd choose a name like vaddr_pin_leased_pages() so that association with a lease is clear from the name :) Also I'd choose the counterpart to be vaddr_unpin_leased_page[s](). Especially having put_page in the name looks confusing to me... Honza -- Jan Kara SUSE Labs, CR ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH 00/34] put_user_pages(): miscellaneous call sites

2019-08-07 Thread Jan Kara
On Fri 02-08-19 12:14:09, John Hubbard wrote: > On 8/2/19 7:52 AM, Jan Kara wrote: > > On Fri 02-08-19 07:24:43, Matthew Wilcox wrote: > > > On Fri, Aug 02, 2019 at 02:41:46PM +0200, Jan Kara wrote: > > > > On Fri 02-08-19 11:12:44, Michal Hocko wrote: > > >

Re: [PATCH 00/34] put_user_pages(): miscellaneous call sites

2019-08-02 Thread Jan Kara
On Fri 02-08-19 07:24:43, Matthew Wilcox wrote: > On Fri, Aug 02, 2019 at 02:41:46PM +0200, Jan Kara wrote: > > On Fri 02-08-19 11:12:44, Michal Hocko wrote: > > > On Thu 01-08-19 19:19:31, john.hubb...@gmail.com wrote: > > > [...] > > > > 2) Convert a

Re: [PATCH 00/34] put_user_pages(): miscellaneous call sites

2019-08-02 Thread Jan Kara
put_page()) but I suppose it would be a high enough barrier for missed conversions... Thoughts? Honza -- Jan Kara SUSE Labs, CR ___ dri-devel mailing list dri-devel@lists.freedesktop.org

Re: [PATCH v4 0/9] mmu notifier provide context informations

2019-02-01 Thread Jan Kara
t seems you have those just not merged yet, right? Honza -- Jan Kara SUSE Labs, CR ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v2 1/3] mm/mmu_notifier: use structure for invalidate_range_start/end callback

2018-12-05 Thread Jan Kara
On Wed 05-12-18 11:40:52, Jerome Glisse wrote: > On Wed, Dec 05, 2018 at 05:35:20PM +0100, Jan Kara wrote: > > On Wed 05-12-18 00:36:26, jgli...@redhat.com wrote: > > > diff --git a/mm/mmu_notifier.c b/mm/mmu_notifier.c > > > index 5119ff846769..5f6665ae3ee2 100644 &g

Re: [PATCH v2 2/3] mm/mmu_notifier: use structure for invalidate_range_start/end calls v2

2018-12-05 Thread Jan Kara
> Signed-off-by: Jérôme Glisse > Acked-by: Christian König The patch looks good to me. You can add: Acked-by: Jan Kara Honza > Cc: Andrew Morton > Cc: Matthew Wilcox > Cc: Ross Zwisler > Cc: Jan Kara > Cc: Dan Wil

Re: [PATCH v2 1/3] mm/mmu_notifier: use structure for invalidate_range_start/end callback

2018-12-05 Thread Jan Kara
int id; > > + /* > + * The end call back will never be call if the start refused to go > + * through because of blockable was false so here assume that we > + * can block. > + */ > + range->blockable = true; > + range->start = start; >

Re: [PATCH 2/3] mm/mmu_notifier: use structure for invalidate_range_start/end calls

2018-12-05 Thread Jan Kara
On Wed 05-12-18 10:53:57, Jerome Glisse wrote: > On Wed, Dec 05, 2018 at 12:04:16PM +0100, Jan Kara wrote: > > Hi Jerome! > > > > On Mon 03-12-18 15:18:16, jgli...@redhat.com wrote: > > > From: Jérôme Glisse > > > > > > To avoid having to

Re: [PATCH 2/3] mm/mmu_notifier: use structure for invalidate_range_start/end calls

2018-12-05 Thread Jan Kara
nother mandatory argument (like you do in your third patch), you just add another argument to the initializer and that way the compiler makes sure you haven't missed any place. Finally the code will remain more compact that way (less lines needed to initialize the struct).

Re: SLAB_TYPESAFE_BY_RCU without constructors (was Re: [PATCH v4 13/17] khwasan: add hooks implementation)

2018-08-06 Thread Jan Kara
is safe. The overwrite by JBD2_POISON_FREE is much older than this RCU stuff (honestly I didn't know about it until this moment) and has nothing to do with the safety of RCU access. Honza -- Jan Kara SUSE Labs, CR ___

Re: [PATCH v4 1/5] mm: add mkwrite param to vm_insert_mixed()

2017-07-24 Thread Jan Kara
On Mon 24-07-17 09:23:57, Ross Zwisler wrote: > On Mon, Jul 24, 2017 at 01:25:30PM +0200, Jan Kara wrote: > > > @@ -1658,14 +1658,28 @@ static int insert_pfn(struct vm_area_struct *vma, > > > unsigned long addr, > > > if (!pte) > > >

Re: [PATCH v4 5/5] dax: move all DAX radix tree defs to fs/dax.c

2017-07-24 Thread Jan Kara
; > Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> > Suggested-by: Jan Kara <j...@suse.cz> Looks good. You can add: Reviewed-by: Jan Kara <j...@suse.cz> Ho

Re: [PATCH v4 4/5] dax: remove DAX code from page_cache_tree_insert()

2017-07-24 Thread Jan Kara
t from dax.h. > > Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> > Suggested-by: Jan Kara <j...@suse.cz> Looks good. You can add: Reviewed-by: Jan Kara <j...@suse.cz> Honza > --- > fs/da

Re: [PATCH v4 3/5] dax: use common 4k zero page for dax mmap reads

2017-07-24 Thread Jan Kara
helper. We will instead > use dax_iomap_fault() to handle write-protection faults. > > This means that insert_pfn() needs to follow the lead of insert_pfn_pmd() > and allow us to pass in a 'mkwrite' flag. If 'mkwrite' is set > insert_pfn() will do the work that was pre

Re: [PATCH v4 2/5] dax: relocate some dax functions

2017-07-24 Thread Jan Kara
x.c, so we need to move its definition above all its callers. > > Signed-off-by: Ross Zwisler <ross.zwis...@linux.intel.com> Looks good. You can add: Reviewed-by: Jan Kara <j...@suse.cz>

Re: [PATCH v4 1/5] mm: add mkwrite param to vm_insert_mixed()

2017-07-24 Thread Jan Kara
ise the patch looks good to me. Honza -- Jan Kara <j...@suse.com> SUSE Labs, CR ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v4 1/5] mm: add mkwrite param to vm_insert_mixed()

2017-07-24 Thread Jan Kara
d false mean. If > we want to go this 'add an argument' route can we at least add an enum > like: > > enum { > PTE_MKDIRTY, > PTE_MKCLEAN, > }; > > ...to differentiate the two cases? So how I usually deal with this is that I create e.

[PATCH 08/10] mm: replace __access_remote_vm() write parameter with gup_flags

2016-10-19 Thread Jan Kara
_vm(NULL, mm, addr, buf, len, > + write ? FOLL_WRITE : 0); > } > > /* > @@ -1871,7 +1873,8 @@ int access_process_vm(struct task_struct *tsk, unsigned > long addr, void *buf, in > if (!mm) > return 0; > > - len = __access_remote_vm(tsk, mm, addr, buf, len, write); > + len = __access_remote_vm(tsk, mm, addr, buf, len, > + write ? FOLL_WRITE : 0); > > mmput(mm); > return len; > -- > 2.10.0 > -- Jan Kara SUSE Labs, CR

[PATCH 07/10] mm: replace get_user_pages_remote() write/force parameters with gup_flags

2016-10-19 Thread Jan Kara
behaviour > (and > hence bugs) within the mm subsystem. > > Signed-off-by: Lorenzo Stoakes Looks good. You can add: Reviewed-by: Jan Kara Honza > --- > drivers/gpu/drm/etnaviv/etnaviv_gem.c | 7 +-- > drivers/g

[PATCH 06/10] mm: replace get_user_pages() write/force parameters with gup_flags

2016-10-19 Thread Jan Kara
hence > bugs) within the mm subsystem. > > Signed-off-by: Lorenzo Stoakes The patch looks good. You can add: Reviewed-by: Jan Kara Honza > --- > arch/cris/arch-v32/drivers/cryptocop.c |

[PATCH 05/10] mm: replace get_vaddr_frames() write/force parameters with gup_flags

2016-10-19 Thread Jan Kara
r (and hence > bugs) within the mm subsystem. > > Signed-off-by: Lorenzo Stoakes Looks good. You can add: Reviewed-by: Jan Kara Honza > --- > drivers/gpu/drm/exynos/exynos_drm_g2d.c| 3 ++- > drivers/media/pla

[PATCH 04/10] mm: replace get_user_pages_locked() write/force parameters with gup_flags

2016-10-19 Thread Jan Kara
behaviour > (and > hence bugs) within the mm subsystem. > > Signed-off-by: Lorenzo Stoakes After our discussion the patch looks good to me. You can add: Reviewed-by: Jan Kara Honza -- Jan Kara SUSE Labs, CR

[PATCH 04/10] mm: replace get_user_pages_locked() write/force parameters with gup_flags

2016-10-19 Thread Jan Kara
On Tue 18-10-16 14:56:09, Lorenzo Stoakes wrote: > On Tue, Oct 18, 2016 at 02:54:25PM +0200, Jan Kara wrote: > > > @@ -1282,7 +1282,7 @@ long get_user_pages(unsigned long start, unsigned > > > long nr_pages, > > > int write,

[PATCH 04/10] mm: replace get_user_pages_locked() write/force parameters with gup_flags

2016-10-18 Thread Jan Kara
s second but I don't care that much. But it definitely should be consistent... Honza -- Jan Kara SUSE Labs, CR

[PATCH 03/10] mm: replace get_user_pages_unlocked() write/force parameters with gup_flags

2016-10-18 Thread Jan Kara
ng behaviour > (and > hence bugs) within the mm subsystem. > > Signed-off-by: Lorenzo Stoakes Looks good. You can add: Reviewed-by: Jan Kara Honza -- Jan Kara SUSE Labs, CR

[PATCH 02/10] mm: remove write/force parameters from __get_user_pages_unlocked()

2016-10-18 Thread Jan Kara
> mm subsystem. > > Signed-off-by: Lorenzo Stoakes The patch looks good. You can add: Reviewed-by: Jan Kara Honza -- Jan Kara SUSE Labs, CR

[PATCH 01/10] mm: remove write/force parameters from __get_user_pages_locked()

2016-10-18 Thread Jan Kara
he mm subsystem. > > Signed-off-by: Lorenzo Stoakes Looks good. You can add: Reviewed-by: Jan Kara Honza -- Jan Kara SUSE Labs, CR

[PATCH] tree wide: Use kvfree() than conditional kfree()/vfree()

2015-11-09 Thread Jan Kara
addr(). Unless callers have special reasons, we can > replace this branch with kvfree(). Please check and reply if you found > problems. > > Signed-off-by: Tetsuo Handa > Acked-by: Michal Hocko You can add Acked-by: J

[PATCH 6/7] drm/i915: Convert to use get_user_page_unlocked()

2015-10-06 Thread Jan Kara
From: Jan Kara <j...@suse.cz> Convert __i915_gem_userptr_get_pages_worker() to use get_user_page_unlocked() so that we don't unnecessarily leak knowledge of mm locking into driver code. CC: Daniel Vetter CC: David Airlie CC: dri-devel at lists.freedesktop.org Signed-off-by: Ja

[PATCH 3/7] drm: Convert via driver to use get_user_pages_fast()

2015-10-06 Thread Jan Kara
From: Jan Kara <j...@suse.cz> CC: David Airlie CC: dri-devel at lists.freedesktop.org Signed-off-by: Jan Kara --- drivers/gpu/drm/via/via_dmablit.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/via/via_dmablit.c b/drivers/gpu/d

[PATCH 0/7] get_user_pages() cleanup

2015-10-06 Thread Jan Kara
From: Jan Kara <j...@suse.cz> Hello, Now when the usage of get_user_pages() in media drivers got cleaned up, here comes a series which removes knowledge about mmap_sem from a couple of other drivers. Patches are trivial and standalone but please check, they are only compile tested.

[PATCH 9/9] [media] mm: Move get_vaddr_frames() behind a config option

2015-06-18 Thread Jan Kara
On Wed 10-06-15 09:37:20, Josh Triplett wrote: > On Wed, Jun 10, 2015 at 06:20:52AM -0300, Mauro Carvalho Chehab wrote: > > From: Jan Kara > > > > get_vaddr_frames() is used by relatively rare drivers so hide it and the > > related functions behind a config o

[PATCH 2/9] mm: Provide new get_vaddr_frames() helper

2015-06-03 Thread Jan Kara
On Tue 02-06-15 15:29:12, Andrew Morton wrote: > On Tue, 2 Jun 2015 17:23:00 +0200 Jan Kara wrote: > > > > That's a lump of new code which many kernels won't be needing. Can we > > > put all this in a new .c file and select it within drivers/media > > > Kco

[PATCH 2/9] mm: Provide new get_vaddr_frames() helper

2015-06-02 Thread Jan Kara
On Thu 28-05-15 16:24:02, Andrew Morton wrote: > On Wed, 13 May 2015 15:08:08 +0200 Jan Kara wrote: > > > Provide new function get_vaddr_frames(). This function maps virtual > > addresses from given start and fills given array with page frame numbers of > > the corre

[PATCH 2/9] mm: Provide new get_vaddr_frames() helper

2015-06-01 Thread Jan Kara
On Thu 28-05-15 16:24:02, Andrew Morton wrote: > On Wed, 13 May 2015 15:08:08 +0200 Jan Kara wrote: > > > Provide new function get_vaddr_frames(). This function maps virtual > > addresses from given start and fills given array with page frame numbers of > > the corre

[PATCH 0/9 v5] Helper to abstract vma handling in media layer

2015-05-25 Thread Jan Kara
On Mon 25-05-15 13:37:56, Hans Verkuil wrote: > Hi Jan, > > On 05/13/2015 03:08 PM, Jan Kara wrote: > > Hello, > > > > I'm sending the fifth version of my patch series to abstract vma handling > > from the various media drivers. The patches got some review fr

[PATCH 9/9] drm/exynos: Convert g2d_userptr_get_dma_addr() to use get_vaddr_frames()

2015-05-14 Thread Jan Kara
On Thu 14-05-15 19:51:23, Inki Dae wrote: > Hi, > > On 2015년 05월 13일 22:08, Jan Kara wrote: > > Convert g2d_userptr_get_dma_addr() to pin pages using get_vaddr_frames(). > > This removes the knowledge about vmas and mmap_sem locking from exynos > > driv

[PATCH 9/9] drm/exynos: Convert g2d_userptr_get_dma_addr() to use get_vaddr_frames()

2015-05-13 Thread Jan Kara
Convert g2d_userptr_get_dma_addr() to pin pages using get_vaddr_frames(). This removes the knowledge about vmas and mmap_sem locking from exynos driver. Also it fixes a problem that the function has been mapping user provided address without holding mmap_sem. Signed-off-by: Jan Kara --- drivers

[PATCH 8/9] media: vb2: Remove unused functions

2015-05-13 Thread Jan Kara
Conversion to the use of pinned pfns made some functions unused. Remove them. Also there's no need to lock mmap_sem in __buf_prepare() anymore. Acked-by: Marek Szyprowski Tested-by: Marek Szyprowski Signed-off-by: Jan Kara --- drivers/media/v4l2-core/videobuf2-memops.c | 114

[PATCH 7/9] media: vb2: Convert vb2_dc_get_userptr() to use frame vector

2015-05-13 Thread Jan Kara
Convert vb2_dc_get_userptr() to use frame vector infrastructure. When we are doing that there's no need to allocate page array and some code can be simplified. Acked-by: Marek Szyprowski Tested-by: Marek Szyprowski Signed-off-by: Jan Kara --- drivers/media/v4l2-core/videobuf2-dma-contig.c

[PATCH 6/9] media: vb2: Convert vb2_vmalloc_get_userptr() to use frame vector

2015-05-13 Thread Jan Kara
Convert vb2_vmalloc_get_userptr() to use frame vector infrastructure. When we are doing that there's no need to allocate page array and some code can be simplified. Acked-by: Marek Szyprowski Tested-by: Marek Szyprowski Signed-off-by: Jan Kara --- drivers/media/v4l2-core/videobuf2-vmalloc.c

[PATCH 5/9] media: vb2: Convert vb2_dma_sg_get_userptr() to use frame vector

2015-05-13 Thread Jan Kara
Acked-by: Marek Szyprowski Tested-by: Marek Szyprowski Signed-off-by: Jan Kara --- drivers/media/v4l2-core/videobuf2-dma-sg.c | 97 +- 1 file changed, 15 insertions(+), 82 deletions(-) diff --git a/drivers/media/v4l2-core/videobuf2-dma-sg.c b/drivers/media/v4l2

[PATCH 3/9] media: omap_vout: Convert omap_vout_uservirt_to_phys() to use get_vaddr_pfns()

2015-05-13 Thread Jan Kara
-by: Jan Kara --- drivers/media/platform/omap/omap_vout.c | 67 +++-- 1 file changed, 31 insertions(+), 36 deletions(-) diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c index 17b189a81ec5..0e4b3cfacc5d 100644 --- a/drivers/media

  1   2   >