linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Matthew Wilcox <willy@infradead.org>
Cc: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>,
	Christoph Hellwig <hch@infradead.org>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	Ira Weiny <ira.weiny@intel.com>
Subject: Re: [PATCH v3 4/4] fs/sysv: Replace kmap() with kmap_local_page()
Date: Fri, 20 Jan 2023 04:45:17 +0000	[thread overview]
Message-ID: <Y8ocXbztTPbxu3bq@ZenIV> (raw)
In-Reply-To: <Y8oYXEjunDDAzSbe@casper.infradead.org>

On Fri, Jan 20, 2023 at 04:28:12AM +0000, Matthew Wilcox wrote:
> On Fri, Jan 20, 2023 at 04:21:06AM +0000, Al Viro wrote:
> > On Thu, Jan 19, 2023 at 04:32:32PM +0100, Fabio M. De Francesco wrote:
> > 
> > > -inline void dir_put_page(struct page *page)
> > > +inline void dir_put_page(struct page *page, void *page_addr)
> > >  {
> > > -	kunmap(page);
> > > +	kunmap_local(page_addr);
> > 
> > ... and that needed to be fixed - at some point "round down to beginning of
> > page" got lost in rebasing...
> 
> You don't need to round down in kunmap().  See:
> 
> void kunmap_local_indexed(const void *vaddr)
> {
>         unsigned long addr = (unsigned long) vaddr & PAGE_MASK;
> 

Sure, but... there's also this:

static inline void __kunmap_local(const void *addr)
{
#ifdef ARCH_HAS_FLUSH_ON_KUNMAP
        kunmap_flush_on_unmap(addr);
#endif
}

Are you sure that the guts of that thing will be happy with address that is not
page-aligned?  I've looked there at some point, got scared of parisc (IIRC)
MMU details and decided not to rely upon that...

  reply	other threads:[~2023-01-20  5:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-19 15:32 [PATCH v3 0/4] fs/sysv: Replace kmap() with kmap_local_page() Fabio M. De Francesco
2023-01-19 15:32 ` [PATCH v3 1/4] fs/sysv: Use the offset_in_page() helper Fabio M. De Francesco
2023-01-19 15:32 ` [PATCH v3 2/4] fs/sysv: Change the signature of dir_get_page() Fabio M. De Francesco
2023-01-19 15:32 ` [PATCH v3 3/4] fs/sysv: Use dir_put_page() in sysv_rename() Fabio M. De Francesco
2023-01-19 15:32 ` [PATCH v3 4/4] fs/sysv: Replace kmap() with kmap_local_page() Fabio M. De Francesco
2023-01-20  0:54   ` Al Viro
2023-01-20  4:21   ` Al Viro
2023-01-20  4:28     ` Matthew Wilcox
2023-01-20  4:45       ` Al Viro [this message]
2023-01-20  4:54         ` Matthew Wilcox
2023-01-20  5:07           ` Al Viro
2023-01-20  5:56             ` Al Viro
2023-01-20  7:17               ` Helge Deller
2023-01-21  8:05                 ` Ira Weiny
2023-01-21 10:57                   ` Helge Deller
2023-01-21 19:26                   ` Al Viro
2023-01-23 17:14               ` Fabio M. De Francesco
2023-01-24 20:16                 ` Ira Weiny
2023-01-23 17:03     ` Fabio M. De Francesco

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=Y8ocXbztTPbxu3bq@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=fmdefrancesco@gmail.com \
    --cc=hch@infradead.org \
    --cc=ira.weiny@intel.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=willy@infradead.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).