Re: [PATCH 1/2] mm: introduce put_user_page*(), placeholder versions

2018-12-07 Thread Matthew Wilcox
On Fri, Dec 07, 2018 at 04:52:42PM -0800, John Hubbard wrote: > I see. OK, HMM has done an efficient job of mopping up unused fields, and now > we are > completely out of space. At this point, after thinking about it carefully, it > seems clear > that it's time for a single, new field: Sorry

Re: [PATCH] aio: Convert ioctx_table to XArray

2018-12-06 Thread Matthew Wilcox
ping On Wed, Nov 28, 2018 at 10:35:31AM -0800, Matthew Wilcox wrote: > This custom resizing array was vulnerable to a Spectre attack (speculating > off the end of an array to a user-controlled offset). The XArray is > not vulnerable to Spectre as it always masks its lookups to

Re: [PATCH] radix tree: Don't return internal entries on lookup

2018-12-06 Thread Matthew Wilcox
On Thu, Dec 06, 2018 at 08:54:03AM +0100, Greg Kurz wrote: > Commit 66ee620f06f9 ("idr: Permit any valid kernel pointer to > be stored") changed the radix tree lookup so that it stops when > reaching the bottom of the tree. But radix_tree_descend() may have > changed the node variable to point to

Re: [PATCH 2/6] __wr_after_init: write rare for static allocation

2018-12-05 Thread Matthew Wilcox
On Tue, Dec 04, 2018 at 02:18:01PM +0200, Igor Stoppa wrote: > +void *__wr_op(unsigned long dst, unsigned long src, __kernel_size_t len, > + enum wr_op_type op) > +{ > + temporary_mm_state_t prev; > + unsigned long flags; > + unsigned long offset; > + unsigned long

Re: [PATCH] /proc/kpagecount: return 0 for special pages that are never mapped

2018-12-05 Thread Matthew Wilcox
On Wed, Dec 05, 2018 at 04:44:15PM -0800, Anthony Yznaga wrote: > On 12/05/2018 11:44 AM, Matthew Wilcox wrote: > > Nobody seems terribly interested in mapcount overflows. I got no response > > to https://lkml.org/lkml/2018/3/2/991 > > Okay.  Thanks for the backg

Re: [PATCH] /proc/kpagecount: return 0 for special pages that are never mapped

2018-12-05 Thread Matthew Wilcox
On Wed, Dec 05, 2018 at 11:40:51AM -0800, Anthony Yznaga wrote: > On 12/04/2018 05:25 PM, Matthew Wilcox wrote: > > On Tue, Dec 04, 2018 at 05:18:32PM -0800, anthony.yzn...@oracle.com wrote: > >> On 12/04/2018 04:48 PM, Matthew Wilcox wrote: > >>> On Tue, Dec 04, 201

Re: [PATCH] /proc/kpagecount: return 0 for special pages that are never mapped

2018-12-04 Thread Matthew Wilcox
On Tue, Dec 04, 2018 at 05:18:32PM -0800, anthony.yzn...@oracle.com wrote: > On 12/04/2018 04:48 PM, Matthew Wilcox wrote: > > On Tue, Dec 04, 2018 at 02:45:26PM -0800, Anthony Yznaga wrote: > >> +static inline int page_has_type(struct page *page) > >> +{ >

Re: [PATCH 1/2] mm: introduce put_user_page*(), placeholder versions

2018-12-04 Thread Matthew Wilcox
On Tue, Dec 04, 2018 at 04:58:01PM -0800, John Hubbard wrote: > On 12/4/18 3:03 PM, Dan Williams wrote: > > Except the LRU fields are already in use for ZONE_DEVICE pages... how > > does this proposal interact with those? > > Very badly: page->pgmap and page->hmm_data both get corrupted. Is there

Re: [PATCH] /proc/kpagecount: return 0 for special pages that are never mapped

2018-12-04 Thread Matthew Wilcox
On Tue, Dec 04, 2018 at 02:45:26PM -0800, Anthony Yznaga wrote: > Certain pages that are never mapped to userspace have a type > indicated in the page_type field of their struct pages (e.g. PG_buddy). > page_type overlaps with _mapcount so set the count to 0 and avoid > calling page_mapcount() for

Re: [PATCH] mm: remove pte_lock_deinit()

2018-11-28 Thread Matthew Wilcox
gt; Signed-off-by: Yu Zhao Reviewed-by: Matthew Wilcox I do have plans to use page->mapping for pt_mm, but this patch won't get in my way when I find the round tuits to do that work.

[PATCH] aio: Convert ioctx_table to XArray

2018-11-28 Thread Matthew Wilcox
This custom resizing array was vulnerable to a Spectre attack (speculating off the end of an array to a user-controlled offset). The XArray is not vulnerable to Spectre as it always masks its lookups to be within the bounds of the array. Signed-off-by: Matthew Wilcox --- fs/aio.c

Re: [PATCH] docs/memory-barriers.txt: Enforce heavy ordering for port I/O accesses

2018-11-27 Thread Matthew Wilcox
On Tue, Nov 27, 2018 at 10:40:21AM -0800, Paul E. McKenney wrote: > On Mon, Nov 26, 2018 at 08:33:49PM +0100, Andrea Parri wrote: > > On Mon, Nov 26, 2018 at 04:52:14PM +, Will Deacon wrote: > > > David Laight explains: > > > > > > | A long time ago there was a document from Intel that said

Re: [PATCHi v2] mm: put_and_wait_on_page_locked() while page is migrated

2018-11-27 Thread Matthew Wilcox
On Tue, Nov 27, 2018 at 12:58:48PM +0200, Mike Rapoport wrote: > > diff --git a/mm/filemap.c b/mm/filemap.c > > index 81adec8ee02c..575e16c037ca 100644 > > --- a/mm/filemap.c > > +++ b/mm/filemap.c > > @@ -1049,25 +1056,44 @@ static void wake_up_page(struct page *page, int bit) > >

Re: [PATCH] mm: fix insert_pfn() return value

2018-11-27 Thread Matthew Wilcox
On Tue, Nov 27, 2018 at 02:43:51PM +, Mans Rullgard wrote: > Commit 9b5a8e00d479 ("mm: convert insert_pfn() to vm_fault_t") accidentally > made insert_pfn() always return an error. Fix this. Umm. VM_FAULT_NOPAGE is not an error. It's saying "I inserted the PFN, there's no struct page for

Re: [PATCHi v2] mm: put_and_wait_on_page_locked() while page is migrated

2018-11-26 Thread Matthew Wilcox
On Mon, Nov 26, 2018 at 11:27:07AM -0800, Hugh Dickins wrote: > Waiting on a page migration entry has used wait_on_page_locked() all > along since 2006: but you cannot safely wait_on_page_locked() without > holding a reference to the page, and that extra reference is enough to > make

Re: [PATCH v2] mm: prototype: rid swapoff of quadratic complexity

2018-11-26 Thread Matthew Wilcox
On Mon, Nov 26, 2018 at 04:55:21PM +, Vineeth Remanan Pillai wrote: > + do { > + XA_STATE(xas, >i_pages, start); > + int i; > + int entries = 0; > + struct page *page; > + pgoff_t indices[PAGEVEC_SIZE]; > + unsigned

Re: [PATCH] mm: do not consider SWAP to calculate available when not necessary

2018-11-25 Thread Matthew Wilcox
On Mon, Nov 26, 2018 at 07:58:23AM +0800, Yang Yang wrote: > When si_mem_available() calculates 'available', it takes SWAP > into account. But if CONFIG_SWAP is N or SWAP is off(some embedded system > would like to do that), there is no need to consider it. I don't understand this patch. The

Re: WARNING: bad usercopy in corrupted (2)

2018-11-25 Thread Matthew Wilcox
On Sun, Nov 25, 2018 at 01:27:09PM -0800, Matthew Wilcox wrote: > On Sun, Nov 25, 2018 at 07:30:04AM -0800, syzbot wrote: > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:aea0a897af9e ptp: Fix pass zero to ERR_PTR() in ptp_cloc

Re: WARNING: bad usercopy in corrupted (2)

2018-11-25 Thread Matthew Wilcox
On Sun, Nov 25, 2018 at 07:30:04AM -0800, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:aea0a897af9e ptp: Fix pass zero to ERR_PTR() in ptp_clock_.. > git tree: net-next If you found it on net-next, I'd suggets cc'ing linux-net ... > console output:

Re: [GIT PULL] XArray updates

2018-11-24 Thread Matthew Wilcox
On Sat, Nov 24, 2018 at 06:49:30PM -0800, Linus Torvalds wrote: > On Sat, Nov 24, 2018 at 6:38 PM Matthew Wilcox wrote: > > > > I generated a new key 5EC42E41545C1F5E and signed a new tag > > xarray-4.20-rc4 > > Hmm. Did you publicize it on any keyserve

Re: [GIT PULL] XArray updates

2018-11-24 Thread Matthew Wilcox
On Sat, Nov 24, 2018 at 10:04:30AM -0800, Linus Torvalds wrote: > On Sat, Nov 24, 2018 at 9:32 AM Matthew Wilcox wrote: > > > > git://git.infradead.org/users/willy/linux-dax.git xarray > > Can you *please* make that a signed tag. Sure! I hadn't been paying attention t

Re: [PATCH -next 1/2] mm/memfd: make F_SEAL_FUTURE_WRITE seal more robust

2018-11-24 Thread Matthew Wilcox
On Sat, Nov 24, 2018 at 04:42:29PM -0800, Andrew Morton wrote: > This changelog doesn't have the nifty test case code which was in > earlier versions? Why do we put regression tests in the changelogs anyway? We have tools/testing/selftests/vm/ already, perhaps they should go there?

[GIT PULL] XArray updates

2018-11-24 Thread Matthew Wilcox
etch changes up to fffc9a260e38acec3187515738122a3ecb24ac90: XArray tests: Add missing locking (2018-11-19 09:41:11 -0500) ---- Matthew Wilcox (19): XArray: Fix xa_for_each with a single element at 0 XArray: Export __xa

Re: [PATCH 1/2] mm: Remove redundant test from find_get_pages_contig

2018-11-23 Thread Matthew Wilcox
On Fri, Nov 23, 2018 at 01:47:32PM +0300, Kirill A. Shutemov wrote: > On Thu, Nov 22, 2018 at 01:32:23PM -0800, Matthew Wilcox wrote: > > After we establish a reference on the page, we check the pointer continues > > to be in the correct position in i_pages. There's no need to che

Re: [PATCH 2/2] page cache: Store only head pages in i_pages

2018-11-23 Thread Matthew Wilcox
On Fri, Nov 23, 2018 at 01:56:44PM +0300, Kirill A. Shutemov wrote: > On Thu, Nov 22, 2018 at 01:32:24PM -0800, Matthew Wilcox wrote: > > Transparent Huge Pages are currently stored in i_pages as pointers to > > consecutive subpages. This patch changes that to storing consecuti

[PATCH 2/2] page cache: Store only head pages in i_pages

2018-11-22 Thread Matthew Wilcox
atch https://lore.kernel.org/lkml/20170126115819.58875-2-kirill.shute...@linux.intel.com/ Signed-off-by: Matthew Wilcox --- include/linux/pagemap.h | 9 mm/filemap.c| 96 + mm/khugepaged.c | 4 +- mm/shmem.c | 2 +- mm/sw

[PATCH 0/2] Better support for THP in page cache

2018-11-22 Thread Matthew Wilcox
This is the first step towards representing THPs more efficiently in the page cache. The next step is to insert one head page instead of HPAGE_PMD_NR. This passes a Trinity run, but I'm sure there's a better test-case out there for THP. Matthew Wilcox (2): mm: Remove redundant test from

[PATCH 1/2] mm: Remove redundant test from find_get_pages_contig

2018-11-22 Thread Matthew Wilcox
caller. Signed-off-by: Matthew Wilcox --- mm/filemap.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index 81adec8ee02cc..538531590ef2d 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1776,16 +1776,6 @@ unsigned find_get_pages_contig(struct address

Re: [PATCH v3] mm: use swp_offset as key in shmem_replace_page()

2018-11-21 Thread Matthew Wilcox
; Cc: sta...@vger.kernel.org # v4.9+ > Signed-off-by: Yu Zhao Reviewed-by: Matthew Wilcox

Re: [PATCH v2] mm: fix swap offset when replacing shmem page

2018-11-20 Thread Matthew Wilcox
On Mon, Nov 19, 2018 at 09:07:27PM -0800, Hugh Dickins wrote: > I don't much like my original use of the name "swap_index", when it was > not the index in a swapfile (though it was the index in the radix tree); > but it will become a correct name with your patch. > > Th

Re: [LKP] dad4f140ed [ 7.709376] WARNING:suspicious_RCU_usage

2018-11-19 Thread Matthew Wilcox
On Sun, Nov 18, 2018 at 05:19:04PM -0800, Matthew Wilcox wrote: > On Mon, Nov 19, 2018 at 09:08:20AM +0800, kernel test robot wrote: > > Greetings, > > > > 0day kernel testing robot got the below dmesg and the first bad commit is > > Umm. I don't see a 'suspicious RCU

Re: [Xen-devel] [PATCH 5/9] drm/xen/xen_drm_front_gem.c: Convert to use vm_insert_range

2018-11-19 Thread Matthew Wilcox
On Mon, Nov 19, 2018 at 01:02:46PM +0200, Oleksandr Andrushchenko wrote: > On 11/19/18 12:42 PM, Souptick Joarder wrote: > > On Mon, Nov 19, 2018 at 3:22 PM Oleksandr Andrushchenko > > wrote: > > > > - unsigned long addr = vma->vm_start; > > > > - int i; > > > > + int err; > > > I

Re: [PATCH] mm/filemap.c: minor optimization in write_iter file operation

2018-11-18 Thread Matthew Wilcox
On Sun, Nov 18, 2018 at 11:02:19PM +0800, Yafang Shao wrote: > On Sun, Nov 18, 2018 at 8:13 PM Matthew Wilcox wrote: > > Did you check the before/after code generation with this patch applied? > > Yes, I did. > My oompiler is gcc-4.8.5, a litte old, and with CONFIG_CC

Re: [PATCH] mm/filemap.c: minor optimization in write_iter file operation

2018-11-18 Thread Matthew Wilcox
On Sun, Nov 18, 2018 at 08:02:18PM +0800, Yafang Shao wrote: > This little adjustment on bitwise operation could make the code a little > faster. > As write_iter is used in lots of critical path, so this code change is > useful for performance. Did you check the before/after code generation with

Re: [PATCH 1/7] node: Link memory nodes to their compute nodes

2018-11-15 Thread Matthew Wilcox
On Thu, Nov 15, 2018 at 07:59:20AM -0700, Keith Busch wrote: > On Thu, Nov 15, 2018 at 05:57:10AM -0800, Matthew Wilcox wrote: > > On Wed, Nov 14, 2018 at 03:49:14PM -0700, Keith Busch wrote: > > > Memory-only nodes will often have affinity to a compute node, and > &g

Re: [PATCH 1/7] node: Link memory nodes to their compute nodes

2018-11-15 Thread Matthew Wilcox
On Wed, Nov 14, 2018 at 03:49:14PM -0700, Keith Busch wrote: > Memory-only nodes will often have affinity to a compute node, and > platforms have ways to express that locality relationship. > > A node containing CPUs or other DMA devices that can initiate memory > access are referred to as

Re: [RFC PATCH 1/1] vmalloc: add test driver to analyse vmalloc allocator

2018-11-15 Thread Matthew Wilcox
On Thu, Nov 15, 2018 at 01:57:50PM +0100, Michal Hocko wrote: > On Thu 15-11-18 00:46:42, Matthew Wilcox wrote: > > How about adding > > > > #ifdef CONFIG_VMALLOC_TEST > > int run_internal_vmalloc_tests(void) > > { > > ... > > } > > EXPORT

Re: [RFC PATCH 1/1] vmalloc: add test driver to analyse vmalloc allocator

2018-11-15 Thread Matthew Wilcox
On Thu, Nov 15, 2018 at 09:39:57AM +0100, Michal Hocko wrote: > On Wed 14-11-18 15:00:53, Andrew Morton wrote: > > #define EXPORT_SYMBOL_SELFTEST EXPORT_SYMBOL_GPL > > > > then write a script which checks the tree for usages of the > > thus-tagged symbols outside tools/testing and lib/ (?) > >

Re: [LKP] [page cache] eb797a8ee0: vm-scalability.throughput -16.5% regression

2018-11-14 Thread Matthew Wilcox
On Wed, Nov 14, 2018 at 05:22:42PM +0800, kernel test robot wrote: > FYI, we noticed a -16.5% regression of vm-scalability.throughput due to > commit: > commit: eb797a8ee0ab4cd03df556980ce7bf167cadaa50 ("page cache: Rearrange > address_space") > > in testcase: vm-scalability > on test machine:

Re: [PATCH v2] vmscan: return NODE_RECLAIM_NOSCAN in node_reclaim() when CONFIG_NUMA is n

2018-11-13 Thread Matthew Wilcox
On Tue, Nov 13, 2018 at 04:04:36PM +0800, Wei Yang wrote: > This patch fix the return value by adjusting to NODE_RECLAIM_NOSCAN. Since > node_reclaim() is only called in page_alloc.c, move it to mm/internal.h. linux/swap.h is included in quite a few places in the kernel, but let's see what's

Re: [PATCH v2] vmscan: return NODE_RECLAIM_NOSCAN in node_reclaim() when CONFIG_NUMA is n

2018-11-13 Thread Matthew Wilcox
m/internal.h. > > Signed-off-by: Wei Yang Reviewed-by: Matthew Wilcox

Re: [PATCH] vmscan: return NODE_RECLAIM_NOSCAN in node_reclaim() when CONFIG_NUMA is n

2018-11-12 Thread Matthew Wilcox
On Tue, Nov 13, 2018 at 12:17:50PM +0800, Wei Yang wrote: > Commit fa5e084e43eb ("vmscan: do not unconditionally treat zones that > fail zone_reclaim() as full") changed the return value of node_reclaim(). > The original return value 0 means NODE_RECLAIM_SOME after this commit. > > While the

Re: [PATCH v4 1/4] mm: reference totalram_pages and managed_pages once per function

2018-11-11 Thread Matthew Wilcox
On Mon, Nov 12, 2018 at 11:37:46AM +0530, Arun KS wrote: > +++ b/arch/um/kernel/mem.c > @@ -51,8 +51,7 @@ void __init mem_init(void) > > /* this will put all low memory onto the freelists */ > memblock_free_all(); > - max_low_pfn = totalram_pages; > - max_pfn =

Re: [PATCH v5 04/27] x86/fpu/xstate: Add XSAVES system states for shadow stack

2018-11-08 Thread Matthew Wilcox
On Thu, Nov 08, 2018 at 01:48:54PM -0800, Dave Hansen wrote: > On 11/8/18 1:22 PM, Andy Lutomirski wrote: > >> +struct cet_kernel_state { > >> + u64 kernel_ssp; /* kernel shadow stack */ > >> + u64 pl1_ssp;/* ring-1 shadow stack */ > >> + u64 pl2_ssp;/* ring-2 shadow

Re: [PATCH v6 13/14] Documentation/x86: Rename and update intel_rdt_ui.txt

2018-11-06 Thread Matthew Wilcox
On Tue, Nov 06, 2018 at 03:41:26PM +, Moger, Babu wrote: > @@ -1,4 +1,7 @@ > -User Interface for Resource Allocation in Intel Resource Director Technology > +User Interface for RESCTRL feature "for Resource Control". > +Intel refers to this feature as Intel Resource Director

Re: + fls-change-parameter-to-unsigned-int.patch added to -mm tree

2018-11-06 Thread Matthew Wilcox
On Tue, Nov 06, 2018 at 06:14:44PM +0300, Alexey Dobriyan wrote: > On Mon, Nov 05, 2018 at 03:33:01PM -0800, a...@linux-foundation.org wrote: > > > -static inline int fls(int x) > > +static inline int fls(unsigned int x) > > { > > - return fls64((unsigned int) x); > > + return fls64(x); > >

Re: [PATCH v10 1/4] ipc: Allow boot time extension of IPCMNI from 32k to 8M

2018-11-06 Thread Matthew Wilcox
On Mon, Nov 05, 2018 at 10:43:43AM -0500, Waiman Long wrote: > The maximum number of unique System V IPC identifiers was limited to > 32k. That limit should be big enough for most use cases. > > However, there are some users out there requesting for more, especially > those that are migrating

[PATCH] fls: Change parameter to unsigned int

2018-11-05 Thread Matthew Wilcox
as an unsigned int, so I don't expect too many problems. Signed-off-by: Matthew Wilcox --- arch/alpha/include/asm/bitops.h | 4 ++-- arch/arc/include/asm/bitops.h| 4 ++-- arch/c6x/include/asm/bitops.h| 2 +- arch/csky/include/asm/bitops.h | 2 +- arch/hexagon

Re: [LKP] [xarray] 0e9446c35a: WARNING:at_include/linux/xarray.h:#xa_mk_value

2018-11-05 Thread Matthew Wilcox
On Mon, Nov 05, 2018 at 10:00:04AM -0800, Matthew Wilcox wrote: > On Mon, Nov 05, 2018 at 09:57:47AM -0800, Linus Torvalds wrote: > > Should that part of the test be surrounded by #ifdef CONFIG_64BIT? Or > > did you _want_ the warnings? > > I should have just made t

Re: [PATCH] mm/mmu_notifier: rename mmu_notifier_synchronize() to <...>_barrier()

2018-11-05 Thread Matthew Wilcox
On Mon, Nov 05, 2018 at 12:18:33PM -0800, Andrew Morton wrote: > > +++ b/mm/mmu_notifier.c > > But as it has no callers, why retain it? ... and this patch missed the declaration of mmu_notifier_synchronize in include/linux/mmu_notifier.h (whether we delete it or rename it, that mention of it

Re: [LKP] [xarray] 0e9446c35a: WARNING:at_include/linux/xarray.h:#xa_mk_value

2018-11-05 Thread Matthew Wilcox
On Mon, Nov 05, 2018 at 09:57:47AM -0800, Linus Torvalds wrote: > Willy, > > On Sun, Nov 4, 2018 at 11:03 PM kernel test robot > wrote: > > > > commit: 0e9446c35a80931044b6d8d2d74a9cabd248539f ("xarray: Add range store > > functionality") > ... > > [ 11.880031] WARNING: CPU: 0 PID: 1 at

Re: [PATCH] mm: Create the new vm_fault_t type

2018-11-03 Thread Matthew Wilcox
On Sat, Nov 03, 2018 at 10:35:04AM +0530, Souptick Joarder wrote: > Page fault handlers are supposed to return VM_FAULT codes, > but some drivers/file systems mistakenly return error > numbers. Now that all drivers/file systems have been converted > to use the vm_fault_t return type, change the

Re: [PATCH v6 1/3] printk: Add line-buffered printk() API.

2018-11-02 Thread Matthew Wilcox
On Fri, Nov 02, 2018 at 10:31:55PM +0900, Tetsuo Handa wrote: > get_printk_buffer() tries to assign a "struct printk_buffer" from > statically preallocated array. get_printk_buffer() returns NULL if > all "struct printk_buffer" are in use, but the caller does not need to > check for NULL.

Re: [PATCH v4] mm/page_owner: clamp read count to PAGE_SIZE

2018-11-01 Thread Matthew Wilcox
On Thu, Nov 01, 2018 at 04:30:12PM -0700, Joe Perches wrote: > On Thu, 2018-11-01 at 14:47 -0700, Andrew Morton wrote: > > +++ a/mm/page_owner.c > > @@ -351,7 +351,7 @@ print_page_owner(char __user *buf, size_ > > .skip = 0 > > }; > > > > - count = count > PAGE_SIZE ? PAGE_SIZE

Re: WARNING in get_unlocked_entry

2018-10-31 Thread Matthew Wilcox
On Wed, Oct 31, 2018 at 10:46:19AM +0100, Dmitry Vyukov wrote: > On Wed, Oct 31, 2018 at 4:18 AM, Matthew Wilcox wrote: > > On Tue, Oct 30, 2018 at 08:00:03AM -0700, syzbot wrote: > >> syzbot found the following crash on: > >> > >> HEAD commit:4b42745211af

Re: WARNING in get_unlocked_entry

2018-10-30 Thread Matthew Wilcox
On Tue, Oct 30, 2018 at 08:00:03AM -0700, syzbot wrote: > syzbot found the following crash on: > > HEAD commit:4b42745211af Merge tag 'armsoc-soc' of git://git.kernel.or.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=1187d06d40 > kernel config:

Re: [PATCHv2] mm/page_owner: use kvmalloc instead of kmalloc

2018-10-28 Thread Matthew Wilcox
On Mon, Oct 29, 2018 at 10:16:43AM +0800, miles.c...@mediatek.com wrote: > The kbuf used by page owner is allocated by kmalloc(), which means it > can use only normal memory and there might be a "out of memory" > issue when we're out of normal memory. > > Use kvmalloc() so we can also allocate

Re: [GIT PULL] XArray for 4.20

2018-10-28 Thread Matthew Wilcox
On Sun, Oct 28, 2018 at 12:21:19PM -0700, Linus Torvalds wrote: > On Sun, Oct 28, 2018 at 12:13 PM Matthew Wilcox wrote: > > > > On Sun, Oct 28, 2018 at 11:50:19AM -0700, Linus Torvalds wrote: > > > > > NOTE! I did get some conflicts with other stuff, and while the

Re: [GIT PULL] XArray for 4.20

2018-10-28 Thread Matthew Wilcox
On Sun, Oct 28, 2018 at 11:50:19AM -0700, Linus Torvalds wrote: > On Tue, Oct 23, 2018 at 1:08 PM Matthew Wilcox wrote: > < > > Please consider pulling the XArray patch set. > > Pulled. Thanks! > I took the more recent version of yours, because by the time I >

Re: [PATCH] mm: simplify get_next_ra_size

2018-10-28 Thread Matthew Wilcox
ff-by: Gao Xiang Reviewed-by: Matthew Wilcox I also considered what would happen with underflow (passing a 'max' less than 16, or less than 2) and it would seem to do the right thing in that case.

Re: [PATCH 10/17] prmem: documentation

2018-10-26 Thread Matthew Wilcox
On Fri, Oct 26, 2018 at 11:26:09AM +0200, Peter Zijlstra wrote: > Jon, > > So the below document is a prime example for why I think RST sucks. As a > text document readability is greatly diminished by all the markup > nonsense. > > This stuff should not become write-only content like html and

Re: [PATCH 13/17] prmem: linked list: disable layout randomization

2018-10-26 Thread Matthew Wilcox
On Fri, Oct 26, 2018 at 11:32:05AM +0200, Peter Zijlstra wrote: > On Wed, Oct 24, 2018 at 12:35:00AM +0300, Igor Stoppa wrote: > > Some of the data structures used in list management are composed by two > > pointers. Since the kernel is now configured by default to randomize the > > layout of data

Re: [RFC PATCH] mm: don't reclaim inodes with many attached pages

2018-10-25 Thread Matthew Wilcox
On Thu, Oct 25, 2018 at 04:20:14PM -0400, Sasha Levin wrote: > On Thu, Oct 25, 2018 at 12:44:42PM -0700, Andrew Morton wrote: > > Yup. Sasha, can you please take care of this? > > Sure, I'll revert it from current stable trees. > > Should 172b06c32b94 and this commit be backported once Roman

Re: [PATCH] mm/page_owner: use vmalloc instead of kmalloc

2018-10-25 Thread Matthew Wilcox
On Fri, Oct 26, 2018 at 02:34:41AM +0800, miles.c...@mediatek.com wrote: > The kbuf used by page owner is allocated by kmalloc(), > which means it can use only normal memory and there might > be a "out of memory" issue when we're out of normal memory. > > Use vmalloc() so we can also allocate

Re: [PATCH 08/17] prmem: struct page: track vmap_area

2018-10-24 Thread Matthew Wilcox
On Thu, Oct 25, 2018 at 02:01:02AM +0300, Igor Stoppa wrote: > > > @@ -1747,6 +1750,10 @@ void *__vmalloc_node_range(unsigned long size, > > > unsigned long align, > > > if (!addr) > > > return NULL; > > > + va = __find_vmap_area((unsigned long)addr); > > > + for (i =

Re: [PATCHv2 1/2] x86/mm: Move LDT remap out of KASLR region on 5-level paging

2018-10-24 Thread Matthew Wilcox
On Wed, Oct 24, 2018 at 03:51:11PM +0300, Kirill A. Shutemov wrote: > +++ b/Documentation/x86/x86_64/mm.txt > @@ -34,23 +34,24 @@ > __||__|_|___ > >

Re: [PATCH 1/2] x86/mm: Move LDT remap out of KASLR region on 5-level paging

2018-10-24 Thread Matthew Wilcox
On Tue, Oct 23, 2018 at 07:31:56PM +0300, Kirill A. Shutemov wrote: > -8800 - c7ff (=64 TB) direct mapping of all phys. > memory > +8880 - 887f (=39 bits) LDT remap for PTI I'm a little bit cross-eyed at this point, but I think the above '888'

Re: [GIT PULL] XArray for 4.20

2018-10-23 Thread Matthew Wilcox
On Tue, Oct 23, 2018 at 01:08:25PM -0700, Matthew Wilcox wrote: > In preparing this pull request, I realised I messed up and pushed a > rebase from two days ago to infradead. There's no substantial change > from the version I pushed out to infradead for linux-next testing on > Se

Re: [PATCH 08/17] prmem: struct page: track vmap_area

2018-10-23 Thread Matthew Wilcox
On Wed, Oct 24, 2018 at 12:34:55AM +0300, Igor Stoppa wrote: > The connection between each page and its vmap_area avoids more expensive > searches through the btree of vmap_areas. Typo -- it's an rbtree. > +++ b/include/linux/mm_types.h > @@ -87,13 +87,24 @@ struct page { >

Re: [RFC PATCH 0/2] improve vmalloc allocation

2018-10-23 Thread Matthew Wilcox
On Tue, Oct 23, 2018 at 01:48:32PM -0600, Shuah Khan wrote: > On 10/23/2018 01:30 PM, Joel Fernandes wrote: > > On Tue, Oct 23, 2018 at 11:13:36AM -0600, Shuah Khan wrote: > >> I like this proposal. I think we will open up lot of test opportunities > >> with > >> this approach. > >> > >> Maybe we

[GIT PULL] XArray for 4.20

2018-10-23 Thread Matthew Wilcox
repository at: git://git.infradead.org/users/willy/linux-dax.git xarray for you to fetch changes up to 3a08cd52c37c793ffc199f6fc2ecfc368e284b2d: radix tree: Remove multiorder support (2018-10-21 10:46:48 -0400) Matthew Wilcox (90

Re: [RFC PATCH 0/2] improve vmalloc allocation

2018-10-23 Thread Matthew Wilcox
On Tue, Oct 23, 2018 at 09:02:56AM -0600, Shuah Khan wrote: > Hi Michal, > > On 10/23/2018 01:23 AM, Michal Hocko wrote: > > Hi Shuah, > > > > On Mon 22-10-18 18:52:53, Uladzislau Rezki wrote: > >> On Mon, Oct 22, 2018 at 02:51:42PM +0200, Michal Hocko wrote: > >>> Hi, > >>> I haven't read

Re: [PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-20 Thread Matthew Wilcox
On Sat, Oct 20, 2018 at 11:09:57PM +0100, Phillip Potter wrote: > Remove switch statement from ufs_set_de_type function in fs/ufs/util.h > header and replace with simple assignment. For each case, S_IFx >> 12 > is equal to DT_x, so in valid cases (mode & S_IFMT) >> 12 should give > us the correct

Re: [GIT PULL] IDA/IDR fixes for 4.19

2018-10-16 Thread Matthew Wilcox
On Tue, Oct 16, 2018 at 06:56:32PM +0200, Greg Kroah-Hartman wrote: > On Mon, Oct 15, 2018 at 01:40:17PM -0700, Matthew Wilcox wrote: > > > > Hi Greg, > > > > I have two tiny fixes, one for the IDA test-suite and one for the IDR > > documentation license. >

Re: [PATCH v5 07/27] mm/mmap: Create a guard area between VMAs

2018-10-12 Thread Matthew Wilcox
On Thu, Oct 11, 2018 at 10:39:24PM +0200, Jann Horn wrote: > Sorry to bring this up so late, but Daniel Micay pointed out to me > that, given that VMA guards will raise the number of VMAs by > inhibiting vma_merge(), people are more likely to run into > /proc/sys/vm/max_map_count (which limits the

[tip:locking/core] locking/spinlocks: Remove an instruction from spin and write locks

2018-10-02 Thread tip-bot for Matthew Wilcox
Commit-ID: 27df89689e257cccb604fdf56c91a75a25aa554a Gitweb: https://git.kernel.org/tip/27df89689e257cccb604fdf56c91a75a25aa554a Author: Matthew Wilcox AuthorDate: Mon, 20 Aug 2018 10:19:14 -0400 Committer: Ingo Molnar CommitDate: Tue, 2 Oct 2018 09:49:42 +0200 locking/spinlocks

Re: [PATCH 3/4] infiniband/mm: convert to the new put_user_page() call

2018-10-01 Thread Matthew Wilcox
On Mon, Oct 01, 2018 at 05:50:13AM -0700, Christoph Hellwig wrote: > On Sat, Sep 29, 2018 at 09:21:17AM -0700, Matthew Wilcox wrote: > > > being slow to pick it up. It looks like there are several patterns, and > > > we have to support both set_page_dirty() and set_

Re: [STABLE PATCH] slub: make ->cpu_partial unsigned int

2018-09-30 Thread Matthew Wilcox
On Sun, Sep 30, 2018 at 06:10:26AM -0700, Greg KH wrote: > On Sun, Sep 30, 2018 at 05:50:38AM -0700, Matthew Wilcox wrote: > > On Sun, Sep 30, 2018 at 06:28:21PM +0800, zhong jiang wrote: > > > From: Alexey Dobriyan > > > > > > [ Upstream commit e5d9

Re: [STABLE PATCH] slub: make ->cpu_partial unsigned int

2018-09-30 Thread Matthew Wilcox
On Sun, Sep 30, 2018 at 06:28:21PM +0800, zhong jiang wrote: > From: Alexey Dobriyan > > [ Upstream commit e5d9998f3e09359b372a037a6ac55ba235d95d57 ] > > /* > * cpu_partial determined the maximum number of objects > * kept in the per cpu partial lists of a processor. >

Re: [PATCH 0/3] namei: implement various scoping AT_* flags

2018-09-29 Thread Matthew Wilcox
On Sat, Sep 29, 2018 at 09:34:24AM -0700, Andy Lutomirski wrote: > Also, as a perhaps-silly suggestion: if you end up adding a new > syscall, I can see a use for a mode that does the path walk but, rather > than failing on a disallowed link, stops early and indicates where it > stopped. Then web

Re: [PATCH 3/4] infiniband/mm: convert to the new put_user_page() call

2018-09-29 Thread Matthew Wilcox
On Fri, Sep 28, 2018 at 08:12:33PM -0700, John Hubbard wrote: > >> +++ b/drivers/infiniband/core/umem.c > >> @@ -60,7 +60,7 @@ static void __ib_umem_release(struct ib_device *dev, > >> struct ib_umem *umem, int d > >>page = sg_page(sg); > >>if (!PageDirty(page) &&

Re: [PATCH 4/9] fuse: allow caching readdir

2018-09-28 Thread Matthew Wilcox
On Fri, Sep 28, 2018 at 05:42:29PM +0200, Miklos Szeredi wrote: > @@ -103,6 +103,21 @@ struct fuse_inode { > /** List of writepage requestst (pending or sent) */ > struct list_head writepages; > > + /** readdir cache */ > + struct { > + /** true if fully cached */

Re: [PATCH 1/9] mm: infrastructure for page fault page caching

2018-09-27 Thread Matthew Wilcox
On Wed, Sep 26, 2018 at 05:08:48PM -0400, Josef Bacik wrote: > We want to be able to cache the result of a previous loop of a page > fault in the case that we use VM_FAULT_RETRY, so introduce > handle_mm_fault_cacheable that will take a struct vm_fault directly, add > a ->cached_page field to

Re: WARNING: kmalloc bug in input_mt_init_slots

2018-09-27 Thread Matthew Wilcox
On Mon, Sep 24, 2018 at 11:41:58AM -0700, Dmitry Torokhov wrote: > > How large is the allocation? AFACIT nRequests larger than KMALLOC_MAX_SIZE > > are larger than the maximum allowed by the page allocator. Thus the warning > > and the NULL return. > > The size in this particular case is being

[PATCH 2/4] drm/virtio: Handle context ID allocation errors

2018-09-26 Thread Matthew Wilcox
It is possible to run out of memory while allocating IDs. The current code would create a context with an invalid ID; change it to return -ENOMEM to userspace. Signed-off-by: Matthew Wilcox --- drivers/gpu/drm/virtio/virtgpu_kms.c | 29 +++- 1 file changed, 11

[PATCH 4/4] drm/virtio: Use IDAs more efficiently

2018-09-26 Thread Matthew Wilcox
0-based IDAs are more efficient than any other base. Convert the 1-based IDAs to be 0-based. Signed-off-by: Matthew Wilcox --- drivers/gpu/drm/virtio/virtgpu_kms.c | 3 ++- drivers/gpu/drm/virtio/virtgpu_vq.c | 7 +-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers

Re: [PATCH] kernel/kcov: Replace vm_insert_page with vmf_insert_page

2018-09-22 Thread Matthew Wilcox
On Fri, Sep 21, 2018 at 12:42:54AM +0530, Souptick Joarder wrote: > for (off = 0; off < size; off += PAGE_SIZE) { > page = vmalloc_to_page(kcov->area + off); > - if (vm_insert_page(vma, vma->vm_start + off, page)) > -

Re: [Announce] LPC 2018: Testing and Fuzzing Microconference

2018-09-22 Thread Matthew Wilcox
On Wed, Sep 19, 2018 at 10:13:15AM -0700, Dhaval Giani wrote: > Sasha and I are pleased to announce the Testing and Fuzzing track at > LPC [ 1 ]. We are planning to continue the discussions from last > year's microconference [2]. Many discussions from the Automated > Testing Summit [3] will also

Re: [PATCH] auxdisplay/cfag12864bfb.c: Replace vm_insert_page

2018-09-22 Thread Matthew Wilcox
On Fri, Sep 21, 2018 at 01:53:16AM +0530, Souptick Joarder wrote: > There is a plan to remove vm_insert_page permanently > and replace it with new API vmf_insert_page which will > return vm_fault_t type. As part of it vm_insert_page > is removed from this driver. > > remap_pfn_range() will be

Re: [PATCH] fs/proc/vmcore.c: Convert to use vmf_error()

2018-09-18 Thread Matthew Wilcox
On Tue, Sep 18, 2018 at 08:29:46PM +0530, Souptick Joarder wrote: > This code can be replaced with vmf_error() inline function. > > Signed-off-by: Souptick Joarder Reviewed-by: Matthew Wilcox

Re: [RFC v10 PATCH 0/3] mm: zap pages with read mmap_sem in munmap for large mapping

2018-09-18 Thread Matthew Wilcox
On Mon, Sep 17, 2018 at 01:00:58PM -0700, Yang Shi wrote: > On 9/15/18 3:10 AM, Matthew Wilcox wrote: > > Something I've been wondering about for a while is whether we should "sort" > > the readers together. ie if the acquirers look like this: > > > > A wr

Re: [RFC v10 PATCH 0/3] mm: zap pages with read mmap_sem in munmap for large mapping

2018-09-15 Thread Matthew Wilcox
On Sat, Sep 15, 2018 at 04:34:56AM +0800, Yang Shi wrote: > Regression and performance data: > Did the below regression test with setting thresh to 4K manually in the code: > * Full LTP > * Trinity (munmap/all vm syscalls) > * Stress-ng: mmap/mmapfork/mmapfixed/mmapaddr/mmapmany/vm > *

Re: [RFC v10 PATCH 2/3] mm: unmap VM_HUGETLB mappings with optimized path

2018-09-15 Thread Matthew Wilcox
gned-off-by: Yang Shi Reviewed-by: Matthew Wilcox

Re: [RFC v10 PATCH 3/3] mm: unmap VM_PFNMAP mappings with optimized path

2018-09-15 Thread Matthew Wilcox
gned-off-by: Yang Shi Reviewed-by: Matthew Wilcox

Re: [RFC v10 PATCH 1/3] mm: mmap: zap pages with read mmap_sem in munmap

2018-09-15 Thread Matthew Wilcox
On Sat, Sep 15, 2018 at 04:34:57AM +0800, Yang Shi wrote: > Suggested-by: Michal Hocko > Suggested-by: Kirill A. Shutemov > Suggested-by: Matthew Wilcox Reviewed-by: Matthew Wilcox Looks good! Thanks for sticking with this patch series. Minor spelling fixes: > - /* >

Re: [PATCH 00/10] iov_iter: Add new iters and use with AFS

2018-09-13 Thread Matthew Wilcox
On Thu, Sep 13, 2018 at 05:18:23PM +0100, David Howells wrote: > Matthew Wilcox wrote: > > > > (5) Add an ITER_DISCARD iterator type. This provides an iterator that > > > simply discards anything written to it. It cannot be used as a data > > >

Re: [PATCH 00/10] iov_iter: Add new iters and use with AFS

2018-09-13 Thread Matthew Wilcox
On Thu, Sep 13, 2018 at 04:51:35PM +0100, David Howells wrote: > (5) Add an ITER_DISCARD iterator type. This provides an iterator that > simply discards anything written to it. It cannot be used as a data > source. May I suggest an ITER_ZERO iterator type instead? It acts like

[PATCH 2/2] x86: Enable named address spaces for percpu data

2018-09-12 Thread Matthew Wilcox
From: Richard Henderson For ease of disabling this feature, split the actual enabling into its own patch. Signed-off-by: Richard Henderson Signed-off-by: Matthew Wilcox --- arch/x86/include/asm/percpu.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/x86/include/asm/percpu.h b

[PATCH 1/2] x86: Use named address spaces in asm/percpu.h

2018-09-12 Thread Matthew Wilcox
,%rax +R_X86_64_32S __uv_hub_info ... + movzbl 0x15(%rax,%r9,1),%ecx ... + or (%rax,%r9,1),%rdx The final vmlinux text size is reduced by about 5k for a standard Fedora configure. Signed-off-by: Richard Henderson [changes as requested by Ingo] Signed-off-by: Matthew Wilcox

[PATCH 0/2] Use named address spaces for percpu data

2018-09-12 Thread Matthew Wilcox
rth wrote a patch back in 2016 that uses gcc's address space machinery to improve code generation for percpu accesses. Ingo asked for some minor changes to be made, but Richard didn't respond. While looking at something related, I came across them, and asked Richard's permission to resurrect and

  1   2   3   4   5   6   7   8   9   10   >