linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Arjun Roy <arjunroy.kdev@gmail.com>
Cc: davem@davemloft.net, akpm@linux-foundation.org,
	linux-mm@kvack.org, arjunroy@google.com, soheil@google.com,
	edumazet@google.com, sfr@canb.auug.org.au, geert@linux-m68k.org
Subject: Re: [PATCH v3 mm 2/2] mm: vm_insert_pages() checks if pte_index defined.
Date: Fri, 28 Feb 2020 09:38:03 -0400	[thread overview]
Message-ID: <20200228133803.GO31668@ziepe.ca> (raw)
In-Reply-To: <20200228054714.204424-2-arjunroy.kdev@gmail.com>

On Thu, Feb 27, 2020 at 09:47:14PM -0800, Arjun Roy wrote:
> diff --git a/mm/memory.c b/mm/memory.c
> index d6f834f7d145..47b28fcc73c2 100644
> +++ b/mm/memory.c
> @@ -1460,18 +1460,6 @@ static int insert_page_into_pte_locked(struct mm_struct *mm, pte_t *pte,
>  	return 0;
>  }
>  
> -static int insert_page_in_batch_locked(struct mm_struct *mm, pmd_t *pmd,
> -			unsigned long addr, struct page *page, pgprot_t prot)
> -{
> -	int err;
> -
> -	if (!page_count(page))
> -		return -EINVAL;
> -	err = validate_page_before_insert(page);
> -	return err ? err : insert_page_into_pte_locked(
> -		mm, pte_offset_map(pmd, addr), addr, page, prot);
> -}
> -
>  /*
>   * This is the old fallback for page remapping.
>   *
> @@ -1500,8 +1488,21 @@ static int insert_page(struct vm_area_struct *vma, unsigned long addr,
>  	return retval;
>  }
>  
> +#ifdef pte_index

It seems a bit weird like this, don't we usually do this kind of stuff
with some CONFIG_ARCH_HAS_XX thing?

IMHO all arches should implement pte_index as the static inline, that
has been the general direction lately.

Jason


  reply	other threads:[~2020-02-28 13:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28  5:47 [PATCH v3 mm 1/2] mm: Define pte_index as macro for x86 Arjun Roy
2020-02-28  5:47 ` [PATCH v3 mm 2/2] mm: vm_insert_pages() checks if pte_index defined Arjun Roy
2020-02-28 13:38   ` Jason Gunthorpe [this message]
2020-02-28 17:22     ` Soheil Hassas Yeganeh

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=20200228133803.GO31668@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=akpm@linux-foundation.org \
    --cc=arjunroy.kdev@gmail.com \
    --cc=arjunroy@google.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-mm@kvack.org \
    --cc=sfr@canb.auug.org.au \
    --cc=soheil@google.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).