Re: [Qemu-devel] [PULL 27/74] checkpatch: allow space in more places before a bracket

2018-08-21 Thread Linus Torvalds
This is commit 38dca988bb20 ("checkpatch: allow space between colon and bracket") upstream, why is that not mentioned anywhere? *Please* mention the upstream commits when back-porting things. Linus On Tue, Aug 21, 2018 at 10:03 AM Paolo Bonzini wrote: > > From: Heinrich Schuch

Re: [Qemu-devel] [PATCH 5/7] userfaultfd: switch to exclusive wakeup for blocking reads

2015-06-15 Thread Linus Torvalds
On Mon, Jun 15, 2015 at 12:19 PM, Andrea Arcangeli wrote: > > Yes, it would leave the other blocked, how is it different from having > just 1 reader and it gets killed? Either is completely wrong. But the read() code can at least see that "I'm returning early due to a signal, so I'll wake up any

Re: [Qemu-devel] [PATCH 1/7] userfaultfd: require UFFDIO_API before other ioctls

2015-06-15 Thread Linus Torvalds
On Jun 15, 2015 11:43 AM, "Andrea Arcangeli" wrote: > > Several times I got very hardly reproducible bugs noticed purely > because of BUG_ON (not VM_BUG_ON) Feel free to use them while developing. Don't send me patches with your broken debug code, though. For users, a dead machine means that it

Re: [Qemu-devel] [PATCH 5/7] userfaultfd: switch to exclusive wakeup for blocking reads

2015-06-15 Thread Linus Torvalds
On Jun 15, 2015 7:22 AM, "Andrea Arcangeli" wrote: > > Blocking reads can easily use exclusive wakeups. Poll in theory could > too but there's no poll_wait_exclusive in common code yet. NAK. Tie while commit message is crap, and so us the comment No, your really cannot "easily use exclusive wai

Re: [Qemu-devel] [PATCH 1/7] userfaultfd: require UFFDIO_API before other ioctls

2015-06-15 Thread Linus Torvalds
On Jun 15, 2015 7:22 AM, "Andrea Arcangeli" wrote: > > + if (cmd != UFFDIO_API) { > + if (ctx->state == UFFD_STATE_WAIT_API) > + return -EINVAL; > + BUG_ON(ctx->state != UFFD_STATE_RUNNING); > + } NAK. Once again: we don't add BUG_ON(

Re: [Qemu-devel] [PATCH 10/23] userfaultfd: add new syscall to provide memory externalization

2015-05-15 Thread Linus Torvalds
On Fri, May 15, 2015 at 9:04 AM, Andrea Arcangeli wrote: > > To fix it I added this along a comment: Ok, this looks good as a explanation/fix for the races (and also as an example of my worry about waitqueue_active() use in general). However, it now makes me suspect that the optimistic "let's ch

Re: [Qemu-devel] [PATCH 10/23] userfaultfd: add new syscall to provide memory externalization

2015-05-14 Thread Linus Torvalds
On Thu, May 14, 2015 at 10:31 AM, Andrea Arcangeli wrote: > +static __always_inline void wake_userfault(struct userfaultfd_ctx *ctx, > + struct userfaultfd_wake_range > *range) > +{ > + if (waitqueue_active(&ctx->fault_wqh)) > + __wake_

Re: [Qemu-devel] [PATCH 19/21] userfaultfd: remap_pages: UFFDIO_REMAP preparation

2015-03-05 Thread Linus Torvalds
On Thu, Mar 5, 2015 at 10:51 AM, Andrea Arcangeli wrote: > > Thanks for your idea that the UFFDIO_COPY is faster, the userland code > we submitted for qemu only uses UFFDIO_COPY|ZEROPAGE, it never uses > UFFDIO_REMAP. Ok. So there's no actual expected use of the remap interface. Good. That makes

Re: [Qemu-devel] [PATCH 19/21] userfaultfd: remap_pages: UFFDIO_REMAP preparation

2015-03-05 Thread Linus Torvalds
On Thu, Mar 5, 2015 at 9:18 AM, Andrea Arcangeli wrote: > remap_pages is the lowlevel mm helper needed to implement > UFFDIO_REMAP. This function is nasty nasty nasty. Is this really worth it? On real loads? That people are expected to use? Considering how we just got rid of one special magic V

Re: [Qemu-devel] [PATCH 10/17] mm: rmap preparation for remap_anon_pages

2014-10-07 Thread Linus Torvalds
On Tue, Oct 7, 2014 at 10:19 AM, Andrea Arcangeli wrote: > > I see what you mean. The only cons I see is that we couldn't use then > recv(tmp_addr, PAGE_SIZE), remap_anon_pages(faultaddr, tmp_addr, > PAGE_SIZE, ..) and retain the zerocopy behavior. Or how could we? > There's no recvfile(userfault

Re: [Qemu-devel] [PATCH 10/17] mm: rmap preparation for remap_anon_pages

2014-10-07 Thread Linus Torvalds
On Mon, Oct 6, 2014 at 12:41 PM, Andrea Arcangeli wrote: > > Of course if somebody has better ideas on how to resolve an anonymous > userfault they're welcome. So I'd *much* rather have a "write()" style interface (ie _copying_ bytes from user space into a newly allocated page that gets mapped) t

Re: [Qemu-devel] [PATCH 10/17] mm: rmap preparation for remap_anon_pages

2014-10-03 Thread Linus Torvalds
On Fri, Oct 3, 2014 at 10:08 AM, Andrea Arcangeli wrote: > > Overall this looks a fairly small change to the rmap code, notably > less intrusive than the nonlinear vmas created by remap_file_pages. Considering that remap_file_pages() was an unmitigated disaster, and -mm has a patch to remove it e

Re: [Qemu-devel] [PATCH 04/17] mm: gup: make get_user_pages_fast and __get_user_pages_fast latency conscious

2014-10-03 Thread Linus Torvalds
On Fri, Oct 3, 2014 at 10:07 AM, Andrea Arcangeli wrote: > This teaches gup_fast and __gup_fast to re-enable irqs and > cond_resched() if possible every BATCH_PAGES. This is disgusting. Many (most?) __gup_fast() users just want a single page, and the stupid overhead of the multi-page version is

Re: [Qemu-devel] [PATCH 01/17] mm: gup: add FOLL_TRIED

2014-10-03 Thread Linus Torvalds
This needs more explanation than that one-liner comment. Make the commit message explain why the new FOLL_TRIED flag exists. Linus On Fri, Oct 3, 2014 at 10:07 AM, Andrea Arcangeli wrote: > From: Andres Lagar-Cavilla > > Reviewed-by: Radim Krčmář > Signed-off-by: Andres Lagar-Cavilla >

Re: [Qemu-devel] [GIT PULL (PATCH 0/4)] VFIO driver for v3.6

2012-07-31 Thread Linus Torvalds
On Mon, Jul 30, 2012 at 4:17 PM, Alex Williamson wrote: > > I'm pretty anxious to find out as well. Linus, ping, any thoughts on > including this in 3.6? Thanks, I just pulled it, but then I unpulled again when I realized it's not a signed tag and it's on github. Please, people. Do tagged rele

Re: [Qemu-devel] Fix refcounting in hugetlbfs quota handling

2011-08-11 Thread Linus Torvalds
On Wed, Aug 10, 2011 at 11:40 PM, David Gibson wrote: > > This patch, therefore, stores a pointer to the inode instead of the > address_space in the page private data for hugepages.  More > importantly it correctly adjusts the reference count on the inodes > when they're added to the page private