From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Carlos Maiolino <cmaiolino@redhat.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 4/5] xfs: remove xfs_zone_{alloc,zalloc} helpers
Date: Thu, 23 Jul 2020 22:40:05 -0700 [thread overview]
Message-ID: <20200724054005.GT3151642@magnolia> (raw)
In-Reply-To: <20200722090518.214624-5-cmaiolino@redhat.com>
On Wed, Jul 22, 2020 at 11:05:17AM +0200, Carlos Maiolino wrote:
> All their users have been converted to use MM API directly, no need to
> keep them around anymore.
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Dave Chinner <dchinner@redhat.com>
> Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
Neato!!!!
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> ---
> fs/xfs/kmem.c | 21 ---------------------
> fs/xfs/kmem.h | 8 --------
> fs/xfs/xfs_trace.h | 1 -
> 3 files changed, 30 deletions(-)
>
> diff --git a/fs/xfs/kmem.c b/fs/xfs/kmem.c
> index f1366475c389c..e841ed781a257 100644
> --- a/fs/xfs/kmem.c
> +++ b/fs/xfs/kmem.c
> @@ -115,24 +115,3 @@ kmem_realloc(const void *old, size_t newsize, xfs_km_flags_t flags)
> congestion_wait(BLK_RW_ASYNC, HZ/50);
> } while (1);
> }
> -
> -void *
> -kmem_zone_alloc(kmem_zone_t *zone, xfs_km_flags_t flags)
> -{
> - int retries = 0;
> - gfp_t lflags = kmem_flags_convert(flags);
> - void *ptr;
> -
> - trace_kmem_zone_alloc(kmem_cache_size(zone), flags, _RET_IP_);
> - do {
> - ptr = kmem_cache_alloc(zone, lflags);
> - if (ptr || (flags & KM_MAYFAIL))
> - return ptr;
> - if (!(++retries % 100))
> - xfs_err(NULL,
> - "%s(%u) possible memory allocation deadlock in %s (mode:0x%x)",
> - current->comm, current->pid,
> - __func__, lflags);
> - congestion_wait(BLK_RW_ASYNC, HZ/50);
> - } while (1);
> -}
> diff --git a/fs/xfs/kmem.h b/fs/xfs/kmem.h
> index 34cbcfde92281..8e8555817e6d3 100644
> --- a/fs/xfs/kmem.h
> +++ b/fs/xfs/kmem.h
> @@ -85,14 +85,6 @@ kmem_zalloc_large(size_t size, xfs_km_flags_t flags)
> #define kmem_zone kmem_cache
> #define kmem_zone_t struct kmem_cache
>
> -extern void *kmem_zone_alloc(kmem_zone_t *, xfs_km_flags_t);
> -
> -static inline void *
> -kmem_zone_zalloc(kmem_zone_t *zone, xfs_km_flags_t flags)
> -{
> - return kmem_zone_alloc(zone, flags | KM_ZERO);
> -}
> -
> static inline struct page *
> kmem_to_page(void *addr)
> {
> diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
> index 50c478374a31b..627fe4fef9ac7 100644
> --- a/fs/xfs/xfs_trace.h
> +++ b/fs/xfs/xfs_trace.h
> @@ -3536,7 +3536,6 @@ DEFINE_KMEM_EVENT(kmem_alloc);
> DEFINE_KMEM_EVENT(kmem_alloc_io);
> DEFINE_KMEM_EVENT(kmem_alloc_large);
> DEFINE_KMEM_EVENT(kmem_realloc);
> -DEFINE_KMEM_EVENT(kmem_zone_alloc);
>
> TRACE_EVENT(xfs_check_new_dalign,
> TP_PROTO(struct xfs_mount *mp, int new_dalign, xfs_ino_t calc_rootino),
> --
> 2.26.2
>
next prev parent reply other threads:[~2020-07-24 5:42 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-22 9:05 [PATCH 0/5] Continue xfs kmem cleanup - V3 Carlos Maiolino
2020-07-22 9:05 ` [PATCH 1/5] xfs: Remove kmem_zone_alloc() usage Carlos Maiolino
2020-07-22 14:13 ` Christoph Hellwig
2020-07-23 9:02 ` Carlos Maiolino
2020-07-24 1:40 ` Dave Chinner
2020-07-24 5:36 ` Darrick J. Wong
2020-07-22 9:05 ` [PATCH 2/5] xfs: Remove kmem_zone_zalloc() usage Carlos Maiolino
2020-07-24 1:41 ` Dave Chinner
2020-07-24 5:39 ` Darrick J. Wong
2020-07-22 9:05 ` [PATCH 3/5] xfs: Modify xlog_ticket_alloc() to use kernel's MM API Carlos Maiolino
2020-07-24 1:41 ` Dave Chinner
2020-07-24 5:39 ` Darrick J. Wong
2020-07-22 9:05 ` [PATCH 4/5] xfs: remove xfs_zone_{alloc,zalloc} helpers Carlos Maiolino
2020-07-24 5:40 ` Darrick J. Wong [this message]
2020-07-22 9:05 ` [PATCH 5/5] xfs: Refactor xfs_da_state_alloc() helper Carlos Maiolino
2020-07-22 14:15 ` Christoph Hellwig
2020-07-24 1:42 ` Dave Chinner
2020-07-24 5:40 ` Darrick J. Wong
-- strict thread matches above, loose matches on Subject: below --
2020-07-10 9:15 [PATCH 0/5] Continue xfs kmem cleanup - V2 Carlos Maiolino
2020-07-10 9:15 ` [PATCH 4/5] xfs: remove xfs_zone_{alloc,zalloc} helpers Carlos Maiolino
2020-07-10 16:09 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200724054005.GT3151642@magnolia \
--to=darrick.wong@oracle.com \
--cc=cmaiolino@redhat.com \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).