linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Anderson <anderson@redhat.com>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Russell King <rmk+kernel@arm.linux.org.uk>,
	kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org,
	Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>,
	JoonSoo Kim <js1304@gmail.com>
Subject: Re: [RFC PATCH 0/8] remove vm_struct list management
Date: Tue, 11 Dec 2012 17:17:05 -0500 (EST)	[thread overview]
Message-ID: <104724866.46130887.1355264225876.JavaMail.root@redhat.com> (raw)
In-Reply-To: <20121211214859.GG5580@redhat.com>



----- Original Message -----
> On Mon, Dec 10, 2012 at 11:40:47PM +0900, JoonSoo Kim wrote:
> 
> [..]
> > > So without knowing details of both the data structures, I think if vmlist
> > > is going away, then user space tools should be able to traverse vmap_area_root
> > > rb tree. I am assuming it is sorted using ->addr field and we should be
> > > able to get vmalloc area start from there. It will just be a matter of
> > > exporting right fields to user space (instead of vmlist).
> > 
> > There is address sorted list of vmap_area, vmap_area_list.
> > So we can use it for traversing vmalloc areas if it is necessary.
> > But, as I mentioned before, kexec write *just* address of vmlist and
> > offset of vm_struct's address field.  It imply that they don't traverse vmlist,
> > because they didn't write vm_struct's next field which is needed for traversing.
> > Without vm_struct's next field, they have no method for traversing.
> > So, IMHO, assigning dummy vm_struct to vmlist which is implemented by [7/8] is
> > a safe way to maintain a compatibility of userspace tool. :)
> 
> Actually the design of "makedumpfile" and "crash" tool is that they know
> about kernel data structures and they adopt to changes. So for major
> changes they keep track of kernel version numbers and if access the
> data structures accordingly.
> 
> Currently we access first element of vmlist to determine start of vmalloc
> address. True we don't have to traverse the list.
> 
> But as you mentioned we should be able to get same information by
> traversing to left most element of vmap_area_list rb tree. So I think
> instead of trying to retain vmlist first element just for backward
> compatibility, I will rather prefer get rid of that code completely
> from kernel and let user space tool traverse rbtree. Just export
> minimum needed info for traversal in user space.

There's no need to traverse the rbtree.  There is a vmap_area_list
linked list of vmap_area structures that is also sorted by virtual
address.

All that makedumpfile would have to do is to access the first vmap_area
in the vmap_area_list -- as opposed to the way that it does now, which is
by accessing the first vm_struct in the to-be-obsoleted vmlist list.

So it seems silly to keep the dummy "vmlist" around.

Dave

  reply	other threads:[~2012-12-11 22:17 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-06 16:09 [RFC PATCH 0/8] remove vm_struct list management Joonsoo Kim
2012-12-06 16:09 ` [RFC PATCH 1/8] mm, vmalloc: change iterating a vmlist to find_vm_area() Joonsoo Kim
2012-12-07  7:44   ` Pekka Enberg
2012-12-07  8:15     ` Bob Liu
2012-12-07 13:40     ` JoonSoo Kim
2012-12-10  5:20   ` guanxuetao
2012-12-10 15:13   ` Chris Metcalf
2013-01-24 15:50   ` Ingo Molnar
2012-12-06 16:09 ` [RFC PATCH 2/8] mm, vmalloc: move get_vmalloc_info() to vmalloc.c Joonsoo Kim
2012-12-06 16:09 ` [RFC PATCH 3/8] mm, vmalloc: protect va->vm by vmap_area_lock Joonsoo Kim
2012-12-06 16:09 ` [RFC PATCH 4/8] mm, vmalloc: iterate vmap_area_list, instead of vmlist in vread/vwrite() Joonsoo Kim
2012-12-06 16:09 ` [RFC PATCH 5/8] mm, vmalloc: iterate vmap_area_list in get_vmalloc_info() Joonsoo Kim
2012-12-06 16:09 ` [RFC PATCH 6/8] mm, vmalloc: iterate vmap_area_list, instead of vmlist, in vmallocinfo() Joonsoo Kim
2012-12-06 16:09 ` [RFC PATCH 7/8] mm, vmalloc: makes vmlist only for kexec Joonsoo Kim
2012-12-06 16:09 ` [RFC PATCH 8/8] mm, vmalloc: remove list management operation after initializing vmalloc Joonsoo Kim
2012-12-06 22:45 ` [RFC PATCH 0/8] remove vm_struct list management Andrew Morton
2012-12-07 13:05   ` JoonSoo Kim
2012-12-06 22:50 ` Andrew Morton
2012-12-07 13:16   ` JoonSoo Kim
2012-12-07 14:59     ` Vivek Goyal
2012-12-10 14:40       ` JoonSoo Kim
2012-12-11 14:41         ` Dave Anderson
2012-12-11 21:48         ` Vivek Goyal
2012-12-11 22:17           ` Dave Anderson [this message]
2012-12-12  5:56             ` Atsushi Kumagai
2012-12-12 14:10               ` JoonSoo Kim
2012-12-07  3:37 ` Bob Liu
2012-12-07 13:35   ` JoonSoo Kim

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=104724866.46130887.1355264225876.JavaMail.root@redhat.com \
    --to=anderson@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=js1304@gmail.com \
    --cc=kexec@lists.infradead.org \
    --cc=kumagai-atsushi@mxc.nes.nec.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=vgoyal@redhat.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).