All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mel Gorman <mgorman@techsingularity.net>
To: Gioh Kim <gioh.kim@lge.com>
Cc: jlayton@poochiereds.net, bfields@fieldses.org, vbabka@suse.cz,
	iamjoonsoo.kim@lge.com, viro@zeniv.linux.org.uk, mst@redhat.com,
	koct9i@gmail.com, minchan@kernel.org, aquini@redhat.com,
	linux-fsdevel@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, linux-api@vger.kernel.org,
	linux-mm@kvack.org, dri-devel@lists.freedesktop.org,
	akpm@linux-foundation.org, Gioh Kim <gurugio@hanmail.net>
Subject: Re: [PATCH 1/4] fs/anon_inodes: new interface to create new inode
Date: Wed, 29 Jul 2015 11:50:03 +0100	[thread overview]
Message-ID: <20150729105003.GB30872@techsingularity.net> (raw)
In-Reply-To: <1436776519-17337-2-git-send-email-gioh.kim@lge.com>

On Mon, Jul 13, 2015 at 05:35:16PM +0900, Gioh Kim wrote:
> From: Gioh Kim <gurugio@hanmail.net>
> 
> The anon_inodes has already complete interfaces to create manage
> many anonymous inodes but don't have interface to get
> new inode. Other sub-modules can create anonymous inode
> without creating and mounting it's own pseudo filesystem.
> 
> Signed-off-by: Gioh Kim <gioh.kim@lge.com>
> Acked-by: Rafael Aquini <aquini@redhat.com>

This is my first run through the series so I'm going to miss details but
this patch confuses me a little. You create an inode to associate with
the balloon dev_info so that page->mapping can be assigned. It's only the
mapping you care about for the aops so why are multiple inodes required? A
driver should be able to share and reference count a single inode. The
motivation to do it that way would be to reduce memory consumption and
this series is motivated by embedded platforms.

anon_inode_getfd has the following

 * Creates a new file by hooking it on a single inode. This is useful for files
 * that do not need to have a full-fledged inode in order to operate correctly.
 * All the files created with anon_inode_getfd() will share a single inode,
 * hence saving memory and avoiding code duplication for the file/inode/dentry
 * setup.  Returns new descriptor or an error code.

If all we care about the inode is the aops then it would follow that
anon_inode_getfd() is ideal. The tradeoff is reference counting overhead.
The changelog needs to explain why anon_inode_getfd() cannot be used.

-- 
Mel Gorman
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Mel Gorman <mgorman@techsingularity.net>
To: Gioh Kim <gioh.kim@lge.com>
Cc: jlayton@poochiereds.net, bfields@fieldses.org, vbabka@suse.cz,
	iamjoonsoo.kim@lge.com, viro@zeniv.linux.org.uk, mst@redhat.com,
	koct9i@gmail.com, minchan@kernel.org, aquini@redhat.com,
	linux-fsdevel@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, linux-api@vger.kernel.org,
	linux-mm@kvack.org, dri-devel@lists.freedesktop.org,
	akpm@linux-foundation.org, Gioh Kim <gurugio@hanmail.net>
Subject: Re: [PATCH 1/4] fs/anon_inodes: new interface to create new inode
Date: Wed, 29 Jul 2015 11:50:03 +0100	[thread overview]
Message-ID: <20150729105003.GB30872@techsingularity.net> (raw)
In-Reply-To: <1436776519-17337-2-git-send-email-gioh.kim@lge.com>

On Mon, Jul 13, 2015 at 05:35:16PM +0900, Gioh Kim wrote:
> From: Gioh Kim <gurugio@hanmail.net>
> 
> The anon_inodes has already complete interfaces to create manage
> many anonymous inodes but don't have interface to get
> new inode. Other sub-modules can create anonymous inode
> without creating and mounting it's own pseudo filesystem.
> 
> Signed-off-by: Gioh Kim <gioh.kim@lge.com>
> Acked-by: Rafael Aquini <aquini@redhat.com>

This is my first run through the series so I'm going to miss details but
this patch confuses me a little. You create an inode to associate with
the balloon dev_info so that page->mapping can be assigned. It's only the
mapping you care about for the aops so why are multiple inodes required? A
driver should be able to share and reference count a single inode. The
motivation to do it that way would be to reduce memory consumption and
this series is motivated by embedded platforms.

anon_inode_getfd has the following

 * Creates a new file by hooking it on a single inode. This is useful for files
 * that do not need to have a full-fledged inode in order to operate correctly.
 * All the files created with anon_inode_getfd() will share a single inode,
 * hence saving memory and avoiding code duplication for the file/inode/dentry
 * setup.  Returns new descriptor or an error code.

If all we care about the inode is the aops then it would follow that
anon_inode_getfd() is ideal. The tradeoff is reference counting overhead.
The changelog needs to explain why anon_inode_getfd() cannot be used.

-- 
Mel Gorman
SUSE Labs

  reply	other threads:[~2015-07-29 10:50 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-13  8:35 [PATCH 0/4] enable migration of driver pages Gioh Kim
2015-07-13  8:35 ` Gioh Kim
2015-07-13  8:35 ` [PATCH 1/4] fs/anon_inodes: new interface to create new inode Gioh Kim
2015-07-13  8:35   ` Gioh Kim
2015-07-13  8:35   ` Gioh Kim
2015-07-29 10:50   ` Mel Gorman [this message]
2015-07-29 10:50     ` Mel Gorman
2015-07-29 10:50   ` Mel Gorman
2015-07-13  8:35 ` [PATCH 2/4] mm/compaction: enable mobile-page migration Gioh Kim
2015-07-13  8:35   ` Gioh Kim
2015-07-13  8:35   ` Gioh Kim
2015-07-27 13:55   ` Vlastimil Babka
2015-07-27 13:55   ` Vlastimil Babka
2015-07-27 13:55     ` Vlastimil Babka
2015-07-27 18:56     ` Konstantin Khlebnikov
     [not found]     ` <55B63851.1080100-AlSwsSmVLrQ@public.gmane.org>
2015-07-27 18:56       ` Konstantin Khlebnikov
2015-07-27 18:56         ` Konstantin Khlebnikov
2015-07-27 18:56         ` Konstantin Khlebnikov
2015-07-28  0:21         ` Gioh Kim
2015-07-28  0:21           ` Gioh Kim
2015-07-28  0:21         ` Gioh Kim
2015-07-29 10:52   ` Mel Gorman
2015-07-29 10:52   ` Mel Gorman
2015-07-29 10:52     ` Mel Gorman
2015-07-31 10:43   ` Minchan Kim
2015-07-31 10:43     ` Minchan Kim
2015-08-10  7:19     ` Minchan Kim
2015-08-10  7:19       ` Minchan Kim
2015-08-10  7:19       ` Minchan Kim
2015-08-10  7:19     ` Minchan Kim
2015-07-31 10:43   ` Minchan Kim
2015-07-13  8:35 ` [PATCH 3/4] mm/balloon: apply mobile page migratable into balloon Gioh Kim
2015-07-13  8:35 ` Gioh Kim
2015-07-13  8:35   ` Gioh Kim
2015-07-13  8:35 ` [PATCH 4/4] mm: remove direct calling of migration Gioh Kim
2015-07-13  9:24 ` [PATCH 0/4] enable migration of driver pages Konstantin Khlebnikov
2015-07-13  9:24 ` Konstantin Khlebnikov
2015-07-13  9:24   ` Konstantin Khlebnikov
2015-07-13 10:02   ` Gioh Kim
2015-07-13 10:02     ` Gioh Kim
2015-07-13 10:02     ` Gioh Kim
     [not found] ` <1436776519-17337-1-git-send-email-gioh.kim-Hm3cg6mZ9cc@public.gmane.org>
2015-07-13  8:35   ` [PATCH 4/4] mm: remove direct calling of migration Gioh Kim
2015-07-13  8:35     ` Gioh Kim
2015-07-13  8:35     ` Gioh Kim
2015-07-27 13:58     ` Vlastimil Babka
2015-07-27 13:58     ` Vlastimil Babka
2015-07-27 13:58       ` Vlastimil Babka
2015-07-28  0:26       ` Gioh Kim
2015-07-28  0:26       ` Gioh Kim
2015-07-28  0:26         ` Gioh Kim
2015-07-13 14:20   ` [PATCH 0/4] enable migration of driver pages Rafael Aquini
2015-07-13 14:20     ` Rafael Aquini
2015-07-13 14:20     ` Rafael Aquini
2015-07-13 14:20 ` Rafael Aquini
2015-07-29 10:49 ` Mel Gorman
2015-07-29 10:49 ` Mel Gorman
2015-07-29 10:49   ` Mel Gorman
2015-07-29 10:55   ` Daniel Vetter
2015-07-29 10:55   ` Daniel Vetter
2015-07-29 10:55     ` Daniel Vetter
2015-07-29 10:55     ` Daniel Vetter
2015-07-29 12:16     ` Mel Gorman
2015-07-29 12:16     ` Mel Gorman
2015-07-29 12:16       ` Mel Gorman
2015-07-29 12:46       ` Daniel Vetter
2015-07-29 12:46         ` Daniel Vetter
2015-07-29 12:46         ` Daniel Vetter
2015-07-30  0:21         ` Gioh Kim
2015-07-30  0:21           ` Gioh Kim
2015-07-30  0:21           ` Gioh Kim
2015-07-30  0:21         ` Gioh 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=20150729105003.GB30872@techsingularity.net \
    --to=mgorman@techsingularity.net \
    --cc=akpm@linux-foundation.org \
    --cc=aquini@redhat.com \
    --cc=bfields@fieldses.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gioh.kim@lge.com \
    --cc=gurugio@hanmail.net \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=jlayton@poochiereds.net \
    --cc=koct9i@gmail.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=mst@redhat.com \
    --cc=vbabka@suse.cz \
    --cc=viro@zeniv.linux.org.uk \
    --cc=virtualization@lists.linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.