nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Shiyang Ruan <ruansy.fnst@fujitsu.com>
Cc: linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org,
	nvdimm@lists.linux.dev, linux-mm@kvack.org,
	linux-fsdevel@vger.kernel.org, djwong@kernel.org,
	dan.j.williams@intel.com, david@fromorbit.com, hch@infradead.org,
	jane.chu@oracle.com
Subject: Re: [PATCH v8 6/9] mm: Introduce mf_dax_kill_procs() for fsdax case
Date: Tue, 14 Dec 2021 07:47:21 -0800	[thread overview]
Message-ID: <Ybi8icn3W7vOEQV+@infradead.org> (raw)
In-Reply-To: <20211202084856.1285285-7-ruansy.fnst@fujitsu.com>

On Thu, Dec 02, 2021 at 04:48:53PM +0800, Shiyang Ruan wrote:
> @@ -254,6 +254,15 @@ static inline bool dax_mapping(struct address_space *mapping)
>  {
>  	return mapping->host && IS_DAX(mapping->host);
>  }
> +static inline unsigned long pgoff_address(pgoff_t pgoff,
> +		struct vm_area_struct *vma)

Empty lines between functions please.

Also this name is a bit generic for something in dax.h, but then again
it does not seem to be DAX-specific, so it might want to move into
a generic MM header with a proper name and kerneldoc comment.

I think a calling conventions that puts the vma before the pgoff would
seem a little more logical as well.

Last but not least such a move should be in a separate patch.

> +extern int mf_dax_kill_procs(struct address_space *mapping, pgoff_t index,
> +			     unsigned long count, int mf_flags);

No need for the extern here.

> -static unsigned long dev_pagemap_mapping_shift(struct page *page,
> +static unsigned long dev_pagemap_mapping_shift(unsigned long address,
>  		struct vm_area_struct *vma)

Passing the vma first would seem more logical again.

> +	if (is_zone_device_page(p)) {
> +		/*
> +		 * Since page->mapping is no more used for fsdax, we should
> +		 * calculate the address in a fsdax way.
> +		 */

		/*
		 * Since page->mapping is not used for fsdax, we need
		 * calculate the address based on the vma.
		 */

> +static void collect_procs_fsdax(struct page *page, struct address_space *mapping,
> +		pgoff_t pgoff, struct list_head *to_kill)

Overly long line here.

  reply	other threads:[~2021-12-14 15:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-02  8:48 [RESEND PATCH v8 0/9] fsdax: introduce fs query to support reflink Shiyang Ruan
2021-12-02  8:48 ` [PATCH v8 1/9] dax: Use percpu rwsem for dax_{read,write}_lock() Shiyang Ruan
2021-12-14 15:40   ` Christoph Hellwig
2021-12-15  2:06     ` Shiyang Ruan
2021-12-16  7:46       ` Christoph Hellwig
2021-12-02  8:48 ` [PATCH v8 2/9] dax: Introduce holder for dax_device Shiyang Ruan
2021-12-15  3:09   ` Dan Williams
2021-12-02  8:48 ` [PATCH v8 3/9] mm: factor helpers for memory_failure_dev_pagemap Shiyang Ruan
2021-12-02  8:48 ` [PATCH v8 4/9] pagemap,pmem: Introduce ->memory_failure() Shiyang Ruan
2021-12-02  8:48 ` [PATCH v8 5/9] fsdax: Introduce dax_lock_mapping_entry() Shiyang Ruan
2021-12-14 15:42   ` Christoph Hellwig
2021-12-02  8:48 ` [PATCH v8 6/9] mm: Introduce mf_dax_kill_procs() for fsdax case Shiyang Ruan
2021-12-14 15:47   ` Christoph Hellwig [this message]
2021-12-02  8:48 ` [PATCH v8 7/9] dax: add dax holder helper for filesystems Shiyang Ruan
2021-12-14 15:47   ` Christoph Hellwig
2021-12-15  2:21     ` Shiyang Ruan
2021-12-16  7:46       ` Christoph Hellwig
2021-12-02  8:48 ` [PATCH v8 8/9] xfs: Implement ->notify_failure() for XFS Shiyang Ruan
2021-12-14 15:54   ` Christoph Hellwig
2021-12-14 16:01   ` Darrick J. Wong
2021-12-02  8:48 ` [PATCH v8 9/9] fsdax: set a CoW flag when associate reflink mappings Shiyang Ruan

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=Ybi8icn3W7vOEQV+@infradead.org \
    --to=hch@infradead.org \
    --cc=dan.j.williams@intel.com \
    --cc=david@fromorbit.com \
    --cc=djwong@kernel.org \
    --cc=jane.chu@oracle.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=nvdimm@lists.linux.dev \
    --cc=ruansy.fnst@fujitsu.com \
    /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).