nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Jane Chu <jane.chu@oracle.com>
To: akpm@linux-foundation.org, dan.j.williams@intel.com,
	mhocko@suse.com, jack@suse.cz, jglisse@redhat.com,
	mike.kravetz@oracle.com, linux-mm@kvack.org,
	linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ipc/shm.c add ->pagesize function to shm_vm_ops
Date: Mon, 30 Jul 2018 20:08:48 -0700	[thread overview]
Message-ID: <a4c4bdab-b0f8-fb10-9b3d-f5740f30748c@oracle.com> (raw)
In-Reply-To: <20180730164459.zduhnk7itoldqnom@linux-r8p5>

Hi, Davidlohr,

On 7/30/2018 9:44 AM, Davidlohr Bueso wrote:

> On Fri, 27 Jul 2018, Jane Chu wrote:
>
>> Commit 05ea88608d4e13 (mm, hugetlbfs: introduce ->pagesize() to
>> vm_operations_struct) adds a new ->pagesize() function to
>> hugetlb_vm_ops, intended to cover all hugetlbfs backed files.
>>
>> With System V shared memory model, if "huge page" is specified,
>> the "shared memory" is backed by hugetlbfs files, but the mappings
>> initiated via shmget/shmat have their original vm_ops overwritten
>> with shm_vm_ops, so we need to add a ->pagesize function to shm_vm_ops.
>> Otherwise, vma_kernel_pagesize() returns PAGE_SIZE given a hugetlbfs
>> backed vma, result in below BUG:
>>
>> fs/hugetlbfs/inode.c
>>        443             if (unlikely(page_mapped(page))) {
>>        444                     BUG_ON(truncate_op);
>>
>> [  242.268342] hugetlbfs: oracle (4592): Using mlock ulimits for 
>> SHM_HUGETLB is deprecated
>> [  282.653208] ------------[ cut here ]------------
>> [  282.708447] kernel BUG at fs/hugetlbfs/inode.c:444!
>> [  282.818957] Modules linked in: nfsv3 rpcsec_gss_krb5 nfsv4 ...
>> [  284.025873] CPU: 35 PID: 5583 Comm: oracle_5583_sbt Not tainted 
>> 4.14.35-1829.el7uek.x86_64 #2
>> [  284.246609] task: ffff9bf0507aaf80 task.stack: ffffa9e625628000
>> [  284.317455] RIP: 0010:remove_inode_hugepages+0x3db/0x3e2
>> ....
>> [  285.292389] Call Trace:
>> [  285.321630]  hugetlbfs_evict_inode+0x1e/0x3e
>> [  285.372707]  evict+0xdb/0x1af
>> [  285.408185]  iput+0x1a2/0x1f7
>> [  285.443661]  dentry_unlink_inode+0xc6/0xf0
>> [  285.492661]  __dentry_kill+0xd8/0x18d
>> [  285.536459]  dput+0x1b5/0x1ed
>> [  285.571939]  __fput+0x18b/0x216
>> [  285.609495]  ____fput+0xe/0x10
>> [  285.646030]  task_work_run+0x90/0xa7
>> [  285.688788]  exit_to_usermode_loop+0xdd/0x116
>> [  285.740905]  do_syscall_64+0x187/0x1ae
>> [  285.785740]  entry_SYSCALL_64_after_hwframe+0x150/0x0
>>
>> Suggested-by: Mike Kravetz <mike.kravetz@oracle.com>
>> Signed-off-by: Jane Chu <jane.chu@oracle.com>
>
> Acked-by: Davidlohr Bueso <dbueso@suse.de>

Thank you!

-jane

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

      reply	other threads:[~2018-07-31  3:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-27 21:17 [PATCH] ipc/shm.c add ->pagesize function to shm_vm_ops Jane Chu
2018-07-27 21:43 ` Mike Kravetz
2018-07-27 21:50 ` Andrew Morton
2018-07-28  0:40   ` Jane Chu
2018-07-28 19:02 ` Matthew Wilcox
2018-07-31  3:06   ` Jane Chu
2018-07-30  8:58 ` Michal Hocko
2018-07-31  3:07   ` Jane Chu
2018-07-30 16:44 ` Davidlohr Bueso
2018-07-31  3:08   ` Jane Chu [this message]

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=a4c4bdab-b0f8-fb10-9b3d-f5740f30748c@oracle.com \
    --to=jane.chu@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=dan.j.williams@intel.com \
    --cc=jack@suse.cz \
    --cc=jglisse@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=mhocko@suse.com \
    --cc=mike.kravetz@oracle.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).