All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] Use generic memory API instead of a custom one
@ 2019-11-13 14:23 Carlos Maiolino
  2019-11-13 14:23 ` [PATCH 01/11] xfs: Remove slab init wrappers Carlos Maiolino
                   ` (10 more replies)
  0 siblings, 11 replies; 32+ messages in thread
From: Carlos Maiolino @ 2019-11-13 14:23 UTC (permalink / raw)
  To: linux-xfs

Hi.

This patchset aims to remove most of XFS custom memory allocation mechanism and
replace it with generic memory interfaces. This includes:

- removing KM_* flags
- removing most of the kmem_* API, with the exception of 2 helpers (see the last
  two patches).

All mem alloc requests using KM_* flags, were replaced following these rules:

- KM_ZONE_* flags were directly replaced by their SLAB_* relative

- KM_NOFS: Replaced by GFP_NOFS
- KM_MAYFAIL: Replaced by __GFP_RETRY_MAYFAIL

- All memalloc requests made with no KM_* flags, like:
	kmem_alloc(item, 0);

  Have been replaced by GFP_KERNEL.

- Every memalloc request without KM_MAYFAIL have been replaced by __GFP_NOFAIL
  and the other flags OR'ed together.

These patches passed a few xfstests runs without issues.
Cheers


Carlos Maiolino (11):
  xfs: Remove slab init wrappers
  xfs: Remove kmem_zone_destroy() wrapper
  xfs: Remove kmem_zone_free() wrapper
  xfs: remove kmem_zone_zalloc()
  xfs: Remove kmem_zone_alloc() wrapper
  xfs: remove kmem_zalloc() wrapper
  xfs: Remove kmem_realloc
  xfs: Convert kmem_alloc() users
  xfs: rework kmem_alloc_{io,large} to use GFP_* flags
  xfs: Remove KM_* flags
  xfs: Remove kmem_alloc_{io, large} and kmem_zalloc_large

 fs/xfs/kmem.c                      | 134 +++-------------------
 fs/xfs/kmem.h                      |  93 +---------------
 fs/xfs/libxfs/xfs_alloc.c          |   3 +-
 fs/xfs/libxfs/xfs_alloc_btree.c    |   2 +-
 fs/xfs/libxfs/xfs_attr_leaf.c      |  11 +-
 fs/xfs/libxfs/xfs_bmap.c           |   8 +-
 fs/xfs/libxfs/xfs_bmap_btree.c     |   2 +-
 fs/xfs/libxfs/xfs_btree.c          |   2 +-
 fs/xfs/libxfs/xfs_da_btree.c       |  18 +--
 fs/xfs/libxfs/xfs_defer.c          |   4 +-
 fs/xfs/libxfs/xfs_dir2.c           |  20 ++--
 fs/xfs/libxfs/xfs_dir2_block.c     |   2 +-
 fs/xfs/libxfs/xfs_dir2_sf.c        |   8 +-
 fs/xfs/libxfs/xfs_ialloc_btree.c   |   2 +-
 fs/xfs/libxfs/xfs_iext_tree.c      |  14 ++-
 fs/xfs/libxfs/xfs_inode_fork.c     |  32 +++---
 fs/xfs/libxfs/xfs_refcount.c       |   9 +-
 fs/xfs/libxfs/xfs_refcount_btree.c |   2 +-
 fs/xfs/libxfs/xfs_rmap.c           |   2 +-
 fs/xfs/libxfs/xfs_rmap_btree.c     |   2 +-
 fs/xfs/scrub/agheader.c            |   4 +-
 fs/xfs/scrub/attr.c                |  10 +-
 fs/xfs/scrub/attr.h                |   3 +-
 fs/xfs/scrub/bitmap.c              |   7 +-
 fs/xfs/scrub/btree.c               |   4 +-
 fs/xfs/scrub/fscounters.c          |   3 +-
 fs/xfs/scrub/refcount.c            |   4 +-
 fs/xfs/scrub/symlink.c             |   3 +-
 fs/xfs/xfs_acl.c                   |   3 +-
 fs/xfs/xfs_attr_inactive.c         |   2 +-
 fs/xfs/xfs_attr_list.c             |   2 +-
 fs/xfs/xfs_bmap_item.c             |   8 +-
 fs/xfs/xfs_buf.c                   |  35 +++---
 fs/xfs/xfs_buf_item.c              |  10 +-
 fs/xfs/xfs_dquot.c                 |  20 ++--
 fs/xfs/xfs_dquot_item.c            |   3 +-
 fs/xfs/xfs_error.c                 |   4 +-
 fs/xfs/xfs_extent_busy.c           |   3 +-
 fs/xfs/xfs_extfree_item.c          |  16 +--
 fs/xfs/xfs_filestream.c            |   2 +-
 fs/xfs/xfs_icache.c                |   6 +-
 fs/xfs/xfs_icreate_item.c          |   4 +-
 fs/xfs/xfs_inode.c                 |   4 +-
 fs/xfs/xfs_inode_item.c            |   5 +-
 fs/xfs/xfs_ioctl.c                 |   8 +-
 fs/xfs/xfs_ioctl32.c               |   3 +-
 fs/xfs/xfs_itable.c                |   8 +-
 fs/xfs/xfs_iwalk.c                 |   5 +-
 fs/xfs/xfs_log.c                   |  19 ++--
 fs/xfs/xfs_log_cil.c               |  10 +-
 fs/xfs/xfs_log_priv.h              |   2 +-
 fs/xfs/xfs_log_recover.c           |  24 ++--
 fs/xfs/xfs_mount.c                 |   7 +-
 fs/xfs/xfs_mru_cache.c             |   5 +-
 fs/xfs/xfs_qm.c                    |   6 +-
 fs/xfs/xfs_refcount_item.c         |  12 +-
 fs/xfs/xfs_rmap_item.c             |  12 +-
 fs/xfs/xfs_rtalloc.c               |   5 +-
 fs/xfs/xfs_super.c                 | 171 ++++++++++++++++-------------
 fs/xfs/xfs_trace.h                 |   1 -
 fs/xfs/xfs_trans.c                 |   6 +-
 fs/xfs/xfs_trans_ail.c             |   3 +-
 fs/xfs/xfs_trans_dquot.c           |   5 +-
 63 files changed, 353 insertions(+), 494 deletions(-)

-- 
2.23.0


^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2019-11-14 10:31 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-13 14:23 [PATCH 00/11] Use generic memory API instead of a custom one Carlos Maiolino
2019-11-13 14:23 ` [PATCH 01/11] xfs: Remove slab init wrappers Carlos Maiolino
2019-11-13 17:06   ` Darrick J. Wong
2019-11-13 14:23 ` [PATCH 02/11] xfs: Remove kmem_zone_destroy() wrapper Carlos Maiolino
2019-11-13 17:06   ` Darrick J. Wong
2019-11-13 14:23 ` [PATCH 03/11] xfs: Remove kmem_zone_free() wrapper Carlos Maiolino
2019-11-13 17:08   ` Darrick J. Wong
2019-11-13 14:23 ` [PATCH 04/11] xfs: remove kmem_zone_zalloc() Carlos Maiolino
2019-11-13 17:18   ` Darrick J. Wong
2019-11-13 20:27     ` Carlos Maiolino
2019-11-13 14:23 ` [PATCH 05/11] xfs: Remove kmem_zone_alloc() wrapper Carlos Maiolino
2019-11-13 17:28   ` Darrick J. Wong
2019-11-13 18:12     ` Darrick J. Wong
2019-11-13 14:23 ` [PATCH 06/11] xfs: remove kmem_zalloc() wrapper Carlos Maiolino
2019-11-13 17:34   ` Darrick J. Wong
2019-11-13 14:23 ` [PATCH 07/11] xfs: Remove kmem_realloc Carlos Maiolino
2019-11-13 17:40   ` Darrick J. Wong
2019-11-13 18:10     ` Darrick J. Wong
2019-11-13 14:23 ` [PATCH 08/11] xfs: Convert kmem_alloc() users Carlos Maiolino
2019-11-13 17:49   ` Darrick J. Wong
2019-11-13 14:23 ` [PATCH 09/11] xfs: rework kmem_alloc_{io,large} to use GFP_* flags Carlos Maiolino
2019-11-13 18:08   ` Darrick J. Wong
2019-11-13 19:56     ` Dave Chinner
2019-11-14  9:40       ` Carlos Maiolino
2019-11-14 10:31         ` Carlos Maiolino
2019-11-13 14:23 ` [PATCH 10/11] xfs: Remove KM_* flags Carlos Maiolino
2019-11-13 18:14   ` Darrick J. Wong
2019-11-13 14:23 ` [PATCH 11/11] xfs: Remove kmem_alloc_{io, large} and kmem_zalloc_large Carlos Maiolino
2019-11-13 18:23   ` Darrick J. Wong
2019-11-13 20:06     ` Dave Chinner
2019-11-13 20:43       ` Eric Sandeen
2019-11-14  9:46       ` Carlos Maiolino

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.