linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: alexjlzheng@gmail.com
To: hch@infradead.org
Cc: alexjlzheng@gmail.com, alexjlzheng@tencent.com,
	chandan.babu@oracle.com, david@fromorbit.com, djwong@kernel.org,
	linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: make xfs_log_iovec independent from xfs_log_vec and release it early
Date: Tue, 25 Jun 2024 19:24:38 +0800	[thread overview]
Message-ID: <20240625112438.1925184-1-alexjlzheng@tencent.com> (raw)
In-Reply-To: <Znqmr3Iki4Q8BkxJ@infradead.org>

On Tue, 25 Jun 2024 04:14:55 -0700, Christoph Hellwig wrote:
> On Tue, Jun 25, 2024 at 12:06:14AM +0800, Jinliang Zheng wrote:
> > xfs_log_iovec is where all log data is saved. Compared to xfs_log_vec itself,
> > xfs_log_iovec occupies a larger memory space.
> > 
> > When their memory spaces are allocated together, the memory occupied by
> > xfs_log_iovec can only be released after iclog is written to the disk log
> > space. But when xfs_log_iovec is written to iclog, its existence becomes
> > meaningless, because a copy of its content is already saved in iclog at this
> > time.
> > 
> > And if they are separated, we can release its memory when the data in
> > xfs_log_iovec is written to iclog. The interval between these two time points
> > is not too small.
> > 
> > Since xfs_log_iovec is the area that currently uses the most memory in
> > xfs_log_vec, this means that we have released quite a lot of memory. Freeing
> > memory that occupies a larger size earlier means smaller memory usage.
> 
> This all needs to go into the commit log.  Preferably including the
> actual quantity of memory saved for a useful workload.

I am sorry, but I didn't get your point. May I ask if you could clarify your
viewpoint more clearly?

Thank you very much. :)
Jinliang Zheng

  reply	other threads:[~2024-06-25 11:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-23 12:31 [PATCH] xfs: make xfs_log_iovec independent from xfs_log_vec and release it early alexjlzheng
2024-06-24 15:25 ` Darrick J. Wong
2024-06-24 16:06   ` Jinliang Zheng
2024-06-25 11:14     ` Christoph Hellwig
2024-06-25 11:24       ` alexjlzheng [this message]
2024-06-25 11:34         ` Christoph Hellwig
2024-06-25 11:33 ` Christoph Hellwig
2024-06-26  5:07   ` Jinliang Zheng
2024-06-25 21:56 ` kernel test robot

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=20240625112438.1925184-1-alexjlzheng@tencent.com \
    --to=alexjlzheng@gmail.com \
    --cc=alexjlzheng@tencent.com \
    --cc=chandan.babu@oracle.com \
    --cc=david@fromorbit.com \
    --cc=djwong@kernel.org \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --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).