to pass in gift pages")
> Signed-off-by: David Howells
> cc: Matthew Wilcox
Reviewed-by: Matthew Wilcox (Oracle)
Cc: sta...@vger.kernel.org
> cc: Jens Axboe
> cc: Miklos Szeredi
> cc: Amit Shah
> cc: linux-fsde...@vger.kernel.org
> cc: virtualization@lists.linux-foundati
already possible with THPs
(both anon and tmpfs backed) long before I introduced folios.
> cc: Matthew Wilcox
> cc: Miklos Szeredi
> cc: Amit Shah
> cc: linux-fsde...@vger.kernel.org
> cc: virtualization@lists.linux-foundation.org
> cc: linux...@kvack.org
> ---
> fs/splice
On Tue, Jan 31, 2023 at 05:00:32AM +, Matthew Wilcox wrote:
> On Mon, Jan 30, 2023 at 08:47:58PM -0800, Jakub Kicinski wrote:
> > kinda random thought but since we're touching this area - could we
> > perhaps move the definition of struct bio_vec and trivial helpers
>
On Mon, Jan 30, 2023 at 08:47:58PM -0800, Jakub Kicinski wrote:
> kinda random thought but since we're touching this area - could we
> perhaps move the definition of struct bio_vec and trivial helpers
> like this into a new header? bvec.h pulls in mm.h which is a right
> behemoth :S
I bet we can
On Thu, Jan 26, 2023 at 04:50:59PM +0200, Mike Rapoport wrote:
> On Thu, Jan 26, 2023 at 11:17:09AM +0200, Mike Rapoport wrote:
> > On Wed, Jan 25, 2023 at 12:38:46AM -0800, Suren Baghdasaryan wrote:
> > > +/* Use when VMA is not part of the VMA tree and needs no locking */
> > > +static inline voi
On Wed, Jan 25, 2023 at 08:49:50AM -0800, Suren Baghdasaryan wrote:
> On Wed, Jan 25, 2023 at 1:10 AM Peter Zijlstra wrote:
> > > + /*
> > > + * Flags, see mm.h.
> > > + * WARNING! Do not modify directly.
> > > + * Use {init|reset|set|clear|mod}_vm_flags() functions instead.
> >
On Wed, Jan 25, 2023 at 12:38:46AM -0800, Suren Baghdasaryan wrote:
> +/* Use when VMA is not part of the VMA tree and needs no locking */
> +static inline void init_vm_flags(struct vm_area_struct *vma,
> + unsigned long flags)
> +{
> + vma->vm_flags = flags;
vm_fl
On Wed, Aug 03, 2022 at 09:24:49AM +0200, Ricardo Cañuelo wrote:
> Hi Matthew,
>
> On mar, ago 02 2022 at 16:56:48, Matthew Wilcox wrote:
> > You don't need to use :c:func:`foo`. You can just write foo() and the
> > tooling will convert it into :c:func:`foo` for yo
On Tue, Aug 02, 2022 at 02:42:22PM +0200, Ricardo Cañuelo wrote:
> +In this case, when the interrupt arrives :c:func:`vp_interrupt` will be
> +called and it will ultimately lead to a call to
> +:c:func:`vring_interrupt`, which ends up calling the virtqueue callback
> +function::
You don't need to
On Thu, Jul 07, 2022 at 07:50:17PM -0700, Hugh Dickins wrote:
> On Wed, 8 Jun 2022, Matthew Wilcox (Oracle) wrote:
>
> > Now that both callers have a folio, convert this function to
> > take a folio & rename it.
> >
> > Signed-off-by: Matthew Wilcox (Oracle)
On Thu, Jun 09, 2022 at 06:33:23PM +0200, David Sterba wrote:
> On Wed, Jun 08, 2022 at 04:02:42PM +0100, Matthew Wilcox (Oracle) wrote:
> > Use filemap_migrate_folio() to do the bulk of the work, and then copy
> > the ordered flag across if needed.
> >
> > Signed-off
On Thu, Jun 09, 2022 at 02:50:20PM +0200, David Hildenbrand wrote:
> On 08.06.22 17:02, Matthew Wilcox (Oracle) wrote:
> > diff --git a/Documentation/filesystems/locking.rst
> > b/Documentation/filesystems/locking.rst
> > index c0fe711f14d3..3d28b23676bd 100644
> > ---
Now that both callers have a folio, convert this function to
take a folio & rename it.
Signed-off-by: Matthew Wilcox (Oracle)
Reviewed-by: Christoph Hellwig
---
mm/migrate.c | 19 ---
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/mm/migrate.c b/mm/migra
This involves converting migrate_huge_page_move_mapping(). We also need a
folio variant of hugetlb_set_page_subpool(), but that's for a later patch.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/hugetlbfs/inode.c| 23 ++-
include/linux/migrate.h | 6 +++--
Use a folio throughout this function. migrate_page() will be converted
later.
Signed-off-by: Matthew Wilcox (Oracle)
Acked-by: Anna Schumaker
Reviewed-by: Christoph Hellwig
---
fs/nfs/file.c | 4 +---
fs/nfs/internal.h | 6 --
fs/nfs/write.c| 16
3 files
Use a folio throughout __buffer_migrate_folio(), add kernel-doc for
buffer_migrate_folio() and buffer_migrate_folio_norefs(), move their
declarations to buffer.h and switch all filesystems that have wired
them up.
Signed-off-by: Matthew Wilcox (Oracle)
Reviewed-by: Christoph Hellwig
---
block
filemap_migrate_folio() fits f2fs's needs perfectly.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/checkpoint.c | 4 +---
fs/f2fs/data.c | 40 +---
fs/f2fs/f2fs.h | 4
fs/f2fs/node.c | 4 +---
4 files changed, 3 inser
migrate_page_move_mapping(), migrate_page_copy() and migrate_page_states()
are all now unused after converting all the filesystems from
aops->migratepage() to aops->migrate_folio().
Signed-off-by: Matthew Wilcox (Oracle)
Reviewed-by: Christoph Hellwig
---
include/linux/migrate.
Use a folio throughout this function.
Signed-off-by: Matthew Wilcox (Oracle)
Reviewed-by: Christoph Hellwig
---
mm/migrate.c | 21 ++---
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/mm/migrate.c b/mm/migrate.c
index 1878de817a01..6b6fec26f4d0 100644
--- a/mm
These drivers are rather uncomfortably hammered into the
address_space_operations hole. They aren't filesystems and don't behave
like filesystems. They just need their own movable_operations structure,
which we can point to directly from page->mapping.
Signed-off-by: Matthew W
filemap_migrate_folio() is a little more general than ubifs really needs,
but it's better to share the code.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/ubifs/file.c | 29 ++---
1 file changed, 2 insertions(+), 27 deletions(-)
diff --git a/fs/ubifs/file.c b/fs/
Use a folio throughout this function. migrate_page() will be converted
later.
Signed-off-by: Matthew Wilcox (Oracle)
Reviewed-by: Christoph Hellwig
---
fs/btrfs/disk-io.c | 22 ++
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs
p the conversions of balloon, zsmalloc and z3fold
- Fix the build errors with hugetlbfs
- Fix the kerneldoc errors
- Fix the ;; typo
Matthew Wilcox (Oracle) (19):
secretmem: Remove isolate_page
mm: Convert all PageMovable users to movable_operations
fs: Add aops->migrate_foli
Convert all callers to pass a folio. Most have the folio
already available. Switch all users from aops->migratepage to
aops->migrate_folio. Also turn the documentation into kerneldoc.
Signed-off-by: Matthew Wilcox (Oracle)
Reviewed-by: Christoph Hellwig
---
drivers/gpu/drm/i9
Provide a folio-based replacement for aops->migratepage. Update the
documentation to document migrate_folio instead of migratepage.
Signed-off-by: Matthew Wilcox (Oracle)
Reviewed-by: Christoph Hellwig
---
Documentation/filesystems/locking.rst | 5 ++--
Documentation/filesystems/vfs.
With all users converted to migrate_folio(), remove this operation.
Signed-off-by: Matthew Wilcox (Oracle)
Reviewed-by: Christoph Hellwig
---
include/linux/fs.h | 2 --
mm/compaction.c| 5 ++---
mm/migrate.c | 3 ---
3 files changed, 2 insertions(+), 8 deletions(-)
diff --git a
Use filemap_migrate_folio() to do the bulk of the work, and then copy
the ordered flag across if needed.
Signed-off-by: Matthew Wilcox (Oracle)
Reviewed-by: Christoph Hellwig
---
fs/btrfs/inode.c | 26 +-
1 file changed, 9 insertions(+), 17 deletions(-)
diff --git a/fs
Use a folio throughout this function.
Signed-off-by: Matthew Wilcox (Oracle)
Reviewed-by: Christoph Hellwig
---
fs/aio.c | 36 ++--
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/fs/aio.c b/fs/aio.c
index 3c249b938632..a1911e86859c 100644
--- a
The isolate_page operation is never called for filesystems, only
for device drivers which call SetPageMovable.
Signed-off-by: Matthew Wilcox (Oracle)
---
mm/secretmem.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/mm/secretmem.c b/mm/secretmem.c
index 206ed6b40c1d..1c7f1775b56e
There is nothing iomap-specific about iomap_migratepage(), and it fits
a pattern used by several other filesystems, so move it to mm/migrate.c,
convert it to be filemap_migrate_folio() and convert the iomap filesystems
to use it.
Signed-off-by: Matthew Wilcox (Oracle)
Reviewed-by: Christoph
Use a folio throughout. migrate_page() will be converted to
migrate_folio() later.
Signed-off-by: Matthew Wilcox (Oracle)
Reviewed-by: Christoph Hellwig
---
mm/migrate.c | 19 +--
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/mm/migrate.c b/mm/migrate.c
index
This is little more than changing the types over; there's no real work
being done in this function.
Signed-off-by: Matthew Wilcox (Oracle)
---
mm/secretmem.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/mm/secretmem.c b/mm/secretmem.c
index 1c7f177
On Tue, Jun 07, 2022 at 03:24:15PM +0100, Matthew Wilcox wrote:
> On Tue, Jun 07, 2022 at 09:36:21AM +0200, David Hildenbrand wrote:
> > On 06.06.22 22:40, Matthew Wilcox (Oracle) wrote:
> > > const struct address_space_operations balloon_aops = {
> > > - .migrate
On Tue, Jun 07, 2022 at 02:13:26PM +0800, kernel test robot wrote:
>fs/hugetlbfs/inode.c: In function 'hugetlbfs_migrate_folio':
> >> fs/hugetlbfs/inode.c:990:17: error: implicit declaration of function
> >> 'folio_migrate_copy' [-Werror=implicit-function-declaration]
> 990 |
On Tue, Jun 07, 2022 at 11:37:45AM +0800, kernel test robot wrote:
> All warnings (new ones prefixed by >>):
>
> >> mm/migrate.c:775: warning: expecting prototype for
> >> buffer_migrate_folio_noref(). Prototype was for
> >> buffer_migrate_folio_norefs() instead
No good deed (turning documentat
On Tue, Jun 07, 2022 at 09:36:21AM +0200, David Hildenbrand wrote:
> On 06.06.22 22:40, Matthew Wilcox (Oracle) wrote:
> > const struct address_space_operations balloon_aops = {
> > - .migratepage = balloon_page_migrate,
> > + .migrate_folio = balloon_migrate_folio,
On Tue, Jun 07, 2022 at 09:41:57AM -0400, Brian Foster wrote:
> On Mon, Jun 06, 2022 at 09:40:35PM +0100, Matthew Wilcox (Oracle) wrote:
> > -static int expected_page_refs(struct address_space *mapping, struct page
> > *page)
> > +static int folio_expected_refs(struct a
This involves converting migrate_huge_page_move_mapping(). We also need a
folio variant of hugetlb_set_page_subpool(), but that's for a later patch.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/hugetlbfs/inode.c| 19 ++-
include/linux/migrate.h | 6 +++---
mm/migr
Now that both callers have a folio, convert this function to
take a folio & rename it.
Signed-off-by: Matthew Wilcox (Oracle)
---
mm/migrate.c | 19 ---
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/mm/migrate.c b/mm/migrate.c
index 77b8c662c9ca..e0a593e5
t it now,
but it's little more than compile tested for other filesystems.
Matthew Wilcox (Oracle) (20):
fs: Add aops->migrate_folio
mm/migrate: Convert fallback_migrate_page() to
fallback_migrate_folio()
mm/migrate: Convert writeout() to take a folio
mm/migrate: Conver
Use a folio throughout this function. migrate_page() will be converted
later.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/nfs/file.c | 4 +---
fs/nfs/internal.h | 6 --
fs/nfs/write.c| 16
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/fs/nfs
This is little more than changing the types over; there's no real work
being done in this function.
Signed-off-by: Matthew Wilcox (Oracle)
---
mm/secretmem.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mm/secretmem.c b/mm/secretmem.c
index 206ed6b
This is little more than changing the types over; there's no real work
being done in this function.
Signed-off-by: Matthew Wilcox (Oracle)
---
mm/balloon_compaction.c | 15 +++
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/mm/balloon_compaction.c
migrate_page_move_mapping(), migrate_page_copy() and migrate_page_states()
are all now unused after converting all the filesystems from
aops->migratepage() to aops->migrate_folio().
Signed-off-by: Matthew Wilcox (Oracle)
---
include/linux/migrate.h | 11 ---
mm/folio-compat.c
Use a folio throughout this function. migrate_page() will be converted
later.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/btrfs/disk-io.c | 22 ++
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 12b11e645c14
Convert all callers to pass a folio. Most have the folio
already available. Switch all users from aops->migratepage to
aops->migrate_folio. Also turn the documentation into kerneldoc.
Signed-off-by: Matthew Wilcox (Oracle)
---
drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 4 +--
fs
Use filemap_migrate_folio() to do the bulk of the work, and then copy
the ordered flag across if needed.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/btrfs/inode.c | 26 +-
1 file changed, 9 insertions(+), 17 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs
Use a folio throughout this function.
Signed-off-by: Matthew Wilcox (Oracle)
---
mm/migrate.c | 21 ++---
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/mm/migrate.c b/mm/migrate.c
index d772ce63d7e2..f19246c12fe9 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
Use a folio throughout. migrate_page() will be converted to
migrate_folio() later.
Signed-off-by: Matthew Wilcox (Oracle)
---
mm/migrate.c | 19 +--
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/mm/migrate.c b/mm/migrate.c
index 75cb6aa38988..d772ce63d7e2
Provide a folio-based replacement for aops->migratepage. Update the
documentation to document migrate_folio instead of migratepage.
Signed-off-by: Matthew Wilcox (Oracle)
---
Documentation/filesystems/locking.rst | 5 ++--
Documentation/filesystems/vfs.rst | 13 ++-
Documentat
Use a folio throughout __buffer_migrate_folio(), add kernel-doc for
buffer_migrate_folio() and buffer_migrate_folio_norefs(), move their
declarations to buffer.h and switch all filesystems that have wired
them up.
Signed-off-by: Matthew Wilcox (Oracle)
---
block/fops.c| 2
There is nothing iomap-specific about iomap_migratepage(), and it fits
a pattern used by several other filesystems, so move it to mm/migrate.c,
convert it to be filemap_migrate_folio() and convert the iomap filesystems
to use it.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/gfs2/aops.c
With all users converted to migrate_folio(), remove this operation.
Signed-off-by: Matthew Wilcox (Oracle)
---
include/linux/fs.h | 2 --
mm/compaction.c| 5 ++---
mm/migrate.c | 10 +-
3 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/include/linux/fs.h b
filemap_migrate_folio() fits f2fs's needs perfectly.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/f2fs/checkpoint.c | 4 +---
fs/f2fs/data.c | 40 +---
fs/f2fs/f2fs.h | 4
fs/f2fs/node.c | 4 +---
4 files changed, 3 inser
z3fold doesn't really use folios, but it needs to be called like this
in order to migrate an individual page. Convert from a folio back to
a page until we decide how to handle migration better for z3fold.
Signed-off-by: Matthew Wilcox (Oracle)
---
mm/z3fold.c | 8 +---
1 file chang
Use a folio throughout this function.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/aio.c | 36 ++--
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/fs/aio.c b/fs/aio.c
index 3c249b938632..a1911e86859c 100644
--- a/fs/aio.c
+++ b/fs/aio.c
filemap_migrate_folio() is a little more general than ubifs really needs,
but it's better to share the code.
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/ubifs/file.c | 29 ++---
1 file changed, 2 insertions(+), 27 deletions(-)
diff --git a/fs/ubifs/file.c b/fs/
zsmalloc doesn't really use folios, but it needs to be called like this
in order to migrate an individual page. Convert from a folio back to
a page until we decide how to handle migration better for zsmalloc.
Signed-off-by: Matthew Wilcox (Oracle)
---
mm/zsmalloc.c | 8 +---
1 file ch
On Thu, May 26, 2022 at 11:48:32AM +0300, Dan Carpenter wrote:
> On Thu, May 26, 2022 at 02:16:34AM +0100, Matthew Wilcox wrote:
> > Bizarre this started showing up now. The recent patch was:
> >
> > - info->alloced += compound_nr(page);
> > - inod
On Wed, May 25, 2022 at 03:20:06PM -0700, Andrew Morton wrote:
> On Wed, 25 May 2022 23:07:35 +0100 Jessica Clarke wrote:
>
> > This is i386, so an unsigned long is 32-bit, but i_blocks is a blkcnt_t
> > i.e. a u64, which makes the shift without a cast of the LHS fishy.
>
> Ah, of course, thanks
On Tue, Feb 22, 2022 at 11:18:18PM +, Matthew Wilcox wrote:
> On Tue, Feb 22, 2022 at 07:58:33AM +, David Woodhouse wrote:
> > On Tue, 2022-02-22 at 01:31 -0500, Michael S. Tsirkin wrote:
> > > On Mon, Feb 21, 2022 at 05:18:48PM +, David Woodhouse wrote:
> > &
On Tue, Feb 22, 2022 at 11:18:18PM +, Matthew Wilcox wrote:
> On Tue, Feb 22, 2022 at 07:58:33AM +, David Woodhouse wrote:
> > On Tue, 2022-02-22 at 01:31 -0500, Michael S. Tsirkin wrote:
> > > On Mon, Feb 21, 2022 at 05:18:48PM +, David Woodhouse wrote:
> > &
In mine linux/uio.h does not
> > include linux/mm_types.h.
>
> Strictly it's
> https://git.infradead.org/users/dwmw2/linux.git/shortlog/refs/heads/xen-evtchn-kernel
> but I'm sure my part isn't relevant; it's just v5.17-rc5.
>
> $ git blame include/linu
On Thu, Nov 04, 2021 at 11:09:19PM -0400, Theodore Ts'o wrote:
> On Thu, Nov 04, 2021 at 12:04:43PM -0700, Darrick J. Wong wrote:
> > > Note that I've avoided implementing read/write fops for dax devices
> > > partly out of concern for not wanting to figure out shared-mmap vs
> > > write coherence
On Fri, Jul 09, 2021 at 07:14:05PM +, Wei Liu wrote:
> You were not CC'ed on this patch, so presumably you got it via one of
> the mailing lists. I'm not sure why you only got this one patch. Perhaps
> if you wait a bit you will get the rest.
No, I won't. You only cc'd linux-doc on this one p
On Fri, Jul 09, 2021 at 04:27:32PM +, Wei Liu wrote:
> > Then don't define your own structure. Use theirs.
>
> I specifically mentioned in the cover letter I didn't do it because I
> was not sure if that would be acceptable. I guess I will find out.
I only got patch 7/8. You can't blame me
On Fri, Jul 09, 2021 at 01:50:13PM +, Wei Liu wrote:
> On Fri, Jul 09, 2021 at 02:02:04PM +0100, Matthew Wilcox wrote:
> > On Fri, Jul 09, 2021 at 11:43:38AM +, Wei Liu wrote:
> > > +static long
> > > +mshv_partition_ioctl_create_device(struct mshv_partition *par
On Fri, Jul 09, 2021 at 11:43:38AM +, Wei Liu wrote:
> +static long
> +mshv_partition_ioctl_create_device(struct mshv_partition *partition,
> + void __user *user_args)
> +{
[...]
> + mshv_partition_get(partition);
> + r = anon_inode_getfd(ops->name, &mshv_device_fops, dev, O_RDWR |
On Tue, Mar 09, 2021 at 04:53:39PM +0100, Christoph Hellwig wrote:
> this series first renames the existing alloc_anon_inode to
> alloc_anon_inode_sb to clearly mark it as requiring a superblock.
>
> It then adds a new alloc_anon_inode that works on the anon_inode
> file system super block, thus r
On Mon, Jan 04, 2021 at 11:19:13AM -0800, Dave Hansen wrote:
> On 12/21/20 8:30 AM, Liang Li wrote:
> > --- a/include/linux/page-flags.h
> > +++ b/include/linux/page-flags.h
> > @@ -137,6 +137,9 @@ enum pageflags {
> > #endif
> > #ifdef CONFIG_64BIT
> > PG_arch_2,
> > +#endif
> > +#ifdef CONF
On Mon, Dec 21, 2020 at 11:25:22AM -0500, Liang Li wrote:
> Creating a VM [64G RAM, 32 CPUs] with GPU passthrough
> =
> QEMU use 4K pages, THP is off
> round1 round2 round3
> w/o this patch:23.5s 24.7s 2
On Mon, Nov 02, 2020 at 04:20:30PM +0100, Bartosz Golaszewski wrote:
> +Chunks allocated with `kmalloc` can be resized with `krealloc`. Similarly
> +to `kmalloc_array`: a helper for resising arrays is provided in the form of
> +`krealloc_array`.
Is there any reason you chose to `do_this` instead o
On Mon, Oct 19, 2020 at 10:56:20PM +0800, Xie Yongji wrote:
> Export zap_page_range() for use in VDUSE.
I think you're missing a lot of MMU notifier work by calling this
directly. It probably works in every scenario you've tested, but won't
work for others. I see you're using VM_MIXEDMAP -- woul
On Sun, Oct 18, 2020 at 12:13:35PM -0700, James Bottomley wrote:
> On Sun, 2020-10-18 at 19:59 +0100, Matthew Wilcox wrote:
> > On Sat, Oct 17, 2020 at 09:09:28AM -0700, t...@redhat.com wrote:
> > > clang has a number of useful, new warnings see
> > > https:
On Sat, Oct 17, 2020 at 09:09:28AM -0700, t...@redhat.com wrote:
> clang has a number of useful, new warnings see
> https://urldefense.com/v3/__https://clang.llvm.org/docs/DiagnosticsReference.html__;!!GqivPVa7Brio!Krxz78O3RKcB9JBMVo_F98FupVhj_jxX60ddN6tKGEbv_cnooXc1nnBmchm-e_O9ieGnyQ$
>
Please
On Wed, Jun 17, 2020 at 01:31:57PM +0200, Michal Hocko wrote:
> On Wed 17-06-20 04:08:20, Matthew Wilcox wrote:
> > If you call vfree() under
> > a spinlock, you're in trouble. in_atomic() only knows if we hold a
> > spinlock for CONFIG_PREEMPT, so it's not safe
On Wed, Jun 17, 2020 at 09:12:12AM +0200, Michal Hocko wrote:
> On Tue 16-06-20 17:37:11, Matthew Wilcox wrote:
> > Not just performance critical, but correctness critical. Since kvfree()
> > may allocate from the vmalloc allocator, I really think that kvfree()
> > sh
On Wed, Jun 17, 2020 at 01:01:30AM +0200, David Sterba wrote:
> On Tue, Jun 16, 2020 at 11:53:50AM -0700, Joe Perches wrote:
> > On Mon, 2020-06-15 at 21:57 -0400, Waiman Long wrote:
> > > v4:
> > > - Break out the memzero_explicit() change as suggested by Dan Carpenter
> > > so that it can
On Tue, Jun 16, 2020 at 11:53:50AM -0700, Joe Perches wrote:
> To this larger audience and last week without reply:
> https://lore.kernel.org/lkml/573b3fbd5927c643920e1364230c296b23e7584d.ca...@perches.com/
>
> Are there _any_ fastpath uses of kfree or vfree?
I worked on adding a 'free' a couple
On Fri, May 29, 2020 at 04:43:08PM -0700, John Hubbard wrote:
> +CASE 5: Pinning in order to write to the data within the page
> +-
> +Even though neither DMA nor Direct IO is involved, just a simple case of
> "pin,
> +access page's data,
On Thu, Apr 16, 2020 at 07:31:55AM +0200, Christoph Hellwig wrote:
> this series improves the use_mm / unuse_mm interface by better
> documenting the assumptions, and my taking the set_fs manipulations
> spread over the callers into the core API.
I appreciate all the work you're doing here.
Do yo
On Tue, Aug 13, 2019 at 11:29:07AM +0200, Paolo Bonzini wrote:
> On 09/08/19 18:24, Matthew Wilcox wrote:
> > On Fri, Aug 09, 2019 at 07:00:26PM +0300, Adalbert Lazăr wrote:
> >> +++ b/include/linux/page-flags.h
> >> @@ -417,8 +417,10 @@ PAGEFLAG(Idle, idle, PF_A
On Fri, Aug 09, 2019 at 07:00:26PM +0300, Adalbert Lazăr wrote:
> +++ b/include/linux/page-flags.h
> @@ -417,8 +417,10 @@ PAGEFLAG(Idle, idle, PF_ANY)
> */
> #define PAGE_MAPPING_ANON0x1
> #define PAGE_MAPPING_MOVABLE 0x2
> +#define PAGE_MAPPING_REMOTE 0x4
Uh. How do you know page->mappi
On Mon, Jan 14, 2019 at 10:29:02AM +1100, Dave Chinner wrote:
> Until you have images (and hence host page cache) shared between
> multiple guests. People will want to do this, because it means they
> only need a single set of pages in host memory for executable
> binaries rather than a set of page
On Wed, Jan 02, 2019 at 03:57:58PM -0500, Michael S. Tsirkin wrote:
> @@ -875,6 +893,8 @@ to the CPU containing it. See the section on "Multicopy
> atomicity"
> for more information.
>
>
> +
> +
> In summary:
>
>(*) Control dependencies can order prior loads against later stores.
Was
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| 5 +++--
drivers/gpu/drm/virtio/virtgpu_object.c | 6 +++---
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a
ida_alloc() can return -ENOMEM in the highly unlikely case we run out
of memory. The current code creates an object with an invalid ID.
Signed-off-by: Matthew Wilcox
---
drivers/gpu/drm/virtio/virtgpu_object.c | 13 +++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a
On Mon, Oct 29, 2018 at 10:53:39PM +0100, Gerd Hoffmann wrote:
> On Wed, Sep 26, 2018 at 09:00:27AM -0700, Matthew Wilcox wrote:
> > I noticed you were using IDRs where you could be using the more efficient
> > IDAs, then while fixing that I noticed the lack of error handling,
>
On Tue, Oct 02, 2018 at 01:43:28PM +0200, Gerd Hoffmann wrote:
> On Wed, Sep 26, 2018 at 09:04:55AM -0700, Matthew Wilcox wrote:
> > On Wed, Sep 26, 2018 at 09:00:31AM -0700, Matthew Wilcox wrote:
> > > @@ -59,6 +59,7 @@ static int virtio_gpu_context_create(struct
> > &g
On Wed, Sep 26, 2018 at 09:00:31AM -0700, Matthew Wilcox wrote:
> @@ -59,6 +59,7 @@ static int virtio_gpu_context_create(struct
> virtio_gpu_device *vgdev,
>
> if (handle < 0)
> return handle;
> + handle++;
> virtio_gpu_cmd_context_create(v
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
It is possible to run out of memory while allocating IDs. The current
code would create an object with an invalid ID; change it to return
-ENOMEM to the caller.
Signed-off-by: Matthew Wilcox
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 3 +--
drivers/gpu/drm/virtio/virtgpu_fb.c| 10
rly handle one of the error cases ... see the comment
embedded in one of the patches.
Matthew Wilcox (4):
drm/virtio: Replace IDRs with IDAs
drm/virtio: Handle context ID allocation errors
drm/virtio: Handle object ID allocation errors
drm/virtio: Use IDAs more efficiently
drivers/gpu/
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
These IDRs were only being used to allocate unique numbers, not to look
up pointers, so they can use the more space-efficient IDA instead.
Signed-off-by: Matthew Wilcox
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 6 ++
drivers/gpu/drm/virtio/virtgpu_kms.c | 18 --
drivers
On Fri, Jun 15, 2018 at 12:43:10PM +0800, Wei Wang wrote:
> +/**
> + * get_from_free_page_list - get free page blocks from a free page list
> + * @order: the order of the free page list to check
> + * @buf: the array to store the physical addresses of the free page blocks
> + * @size: the array siz
On Thu, Jun 14, 2018 at 10:06:58PM -0400, Martin K. Petersen wrote:
>
> Matthew,
>
> > Removing the percpu_ida code nets over 400 lines of removal. It's not
> > as spectacular as deleting an entire architecture, but it's still a
> > worthy reduction in lines of code.
>
> Since most of the chang
Fixed bugs pointed out by Jens in iscsit_wait_for_tag()
- Abstracted out tag freeing as requested by Bart
- Made iscsit_wait_for_tag static as pointed out by 0day
Matthew Wilcox (3):
target: Abstract tag freeing
Convert target drivers to use sbitmap
Remove percpu_ida
drivers/scsi/qla2xxx/ql
With its one user gone, remove the library code.
Signed-off-by: Matthew Wilcox
---
include/linux/percpu_ida.h | 83 -
lib/Makefile | 2 +-
lib/percpu_ida.c | 370 -
3 files changed, 1 insertion(+), 454 deletions(-)
delete
better performance justifies the
additional complexity.
Signed-off-by: Matthew Wilcox
Acked-by: Felipe Balbi# f_tcm
---
drivers/scsi/qla2xxx/qla_target.c| 10 ---
drivers/target/iscsi/iscsi_target_util.c | 33 +---
drivers/target/sbp/sbp_target.c | 5
1 - 100 of 170 matches
Mail list logo