From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Armin Rigo <arigo@tunes.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCHv2 0/2] remap_file_pages() decommission
Date: Fri, 9 May 2014 21:19:35 +0300 [thread overview]
Message-ID: <20140509181935.GA24841@node.dhcp.inet.fi> (raw)
In-Reply-To: <CA+55aFz9Yo7OC03tKt2wsdd8cDi00yxvMwszrsOsx0ZVEh6zqQ@mail.gmail.com>
On Fri, May 09, 2014 at 08:14:08AM -0700, Linus Torvalds wrote:
> On Fri, May 9, 2014 at 7:05 AM, Kirill A. Shutemov
> <kirill.shutemov@linux.intel.com> wrote:
> >
> > Hm. I'm confused here. Do we have any limit forced per-user?
>
> Sure we do. See "struct user_struct". We limit max number of
> processes, open files, signals etc.
Okay got it.
BTW, nobody seems use field 'files' of user_struct:
>From 8bb8a0c740ad66126be4d3c092493e1ecc2189ef Mon Sep 17 00:00:00 2001
From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Date: Fri, 9 May 2014 20:25:55 +0300
Subject: [PATCH] kernel: drop unused field 'files' from user_struct
Nobody seems uses it for a long time. Let's drop it.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
---
include/linux/sched.h | 1 -
kernel/user.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 25f54c79f757..f0503ffa7a59 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -745,7 +745,6 @@ static inline int signal_group_exit(const struct signal_struct *sig)
struct user_struct {
atomic_t __count; /* reference count */
atomic_t processes; /* How many processes does this user have? */
- atomic_t files; /* How many open files does this user have? */
atomic_t sigpending; /* How many pending signals does this user have? */
#ifdef CONFIG_INOTIFY_USER
atomic_t inotify_watches; /* How many inotify watches does this user have? */
diff --git a/kernel/user.c b/kernel/user.c
index 294fc6a94168..4efa39350e44 100644
--- a/kernel/user.c
+++ b/kernel/user.c
@@ -87,7 +87,6 @@ static DEFINE_SPINLOCK(uidhash_lock);
struct user_struct root_user = {
.__count = ATOMIC_INIT(1),
.processes = ATOMIC_INIT(1),
- .files = ATOMIC_INIT(0),
.sigpending = ATOMIC_INIT(0),
.locked_shm = 0,
.uid = GLOBAL_ROOT_UID,
--
Kirill A. Shutemov
WARNING: multiple messages have this Message-ID (diff)
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Armin Rigo <arigo@tunes.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCHv2 0/2] remap_file_pages() decommission
Date: Fri, 9 May 2014 21:19:35 +0300 [thread overview]
Message-ID: <20140509181935.GA24841@node.dhcp.inet.fi> (raw)
In-Reply-To: <CA+55aFz9Yo7OC03tKt2wsdd8cDi00yxvMwszrsOsx0ZVEh6zqQ@mail.gmail.com>
On Fri, May 09, 2014 at 08:14:08AM -0700, Linus Torvalds wrote:
> On Fri, May 9, 2014 at 7:05 AM, Kirill A. Shutemov
> <kirill.shutemov@linux.intel.com> wrote:
> >
> > Hm. I'm confused here. Do we have any limit forced per-user?
>
> Sure we do. See "struct user_struct". We limit max number of
> processes, open files, signals etc.
Okay got it.
BTW, nobody seems use field 'files' of user_struct:
next prev parent reply other threads:[~2014-05-09 18:22 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-08 12:41 [PATCHv2 0/2] remap_file_pages() decommission Kirill A. Shutemov
2014-05-08 12:41 ` Kirill A. Shutemov
2014-05-08 12:41 ` [PATCH 1/2] mm: mark remap_file_pages() syscall as deprecated Kirill A. Shutemov
2014-05-08 12:41 ` Kirill A. Shutemov
2014-06-12 5:48 ` Michael Kerrisk
2014-06-12 5:48 ` Michael Kerrisk
2014-06-12 5:48 ` Michael Kerrisk
2014-06-12 9:40 ` Kirill A. Shutemov
2014-06-12 9:40 ` Kirill A. Shutemov
2014-06-12 9:40 ` Kirill A. Shutemov
2014-06-12 9:44 ` Michael Kerrisk (man-pages)
2014-06-12 9:44 ` Michael Kerrisk (man-pages)
2014-05-08 12:41 ` [PATCH 2/2] mm: replace remap_file_pages() syscall with emulation Kirill A. Shutemov
2014-05-08 12:41 ` Kirill A. Shutemov
2014-05-08 21:57 ` Andrew Morton
2014-05-08 21:57 ` Andrew Morton
2014-05-12 15:11 ` Sasha Levin
2014-05-12 15:11 ` Sasha Levin
2014-05-12 17:05 ` Kirill A. Shutemov
2014-05-12 17:05 ` Kirill A. Shutemov
2014-05-14 20:52 ` Sasha Levin
2014-05-14 20:52 ` Sasha Levin
2014-05-14 21:17 ` Kirill A. Shutemov
2014-05-14 21:17 ` Kirill A. Shutemov
2014-05-14 21:40 ` Andrew Morton
2014-05-14 21:40 ` Andrew Morton
2014-05-13 7:32 ` Armin Rigo
2014-05-13 7:32 ` Armin Rigo
2014-05-13 12:57 ` Sasha Levin
2014-05-13 12:57 ` Sasha Levin
2014-05-08 15:35 ` [PATCHv2 0/2] remap_file_pages() decommission Linus Torvalds
2014-05-08 15:35 ` Linus Torvalds
2014-05-08 15:44 ` Armin Rigo
2014-05-08 15:44 ` Armin Rigo
2014-05-08 16:02 ` Kirill A. Shutemov
2014-05-08 16:02 ` Kirill A. Shutemov
2014-05-08 16:08 ` Linus Torvalds
2014-05-08 16:08 ` Linus Torvalds
2014-05-09 14:05 ` Kirill A. Shutemov
2014-05-09 14:05 ` Kirill A. Shutemov
2014-05-09 15:14 ` Linus Torvalds
2014-05-09 15:14 ` Linus Torvalds
2014-05-09 18:19 ` Kirill A. Shutemov [this message]
2014-05-09 18:19 ` Kirill A. Shutemov
2014-05-12 12:43 ` Kirill A. Shutemov
2014-05-12 12:43 ` Kirill A. Shutemov
2014-05-12 14:59 ` Konstantin Khlebnikov
2014-05-12 14:59 ` Konstantin Khlebnikov
2014-05-12 3:36 ` Andi Kleen
2014-05-12 3:36 ` Andi Kleen
2014-05-12 5:16 ` Konstantin Khlebnikov
2014-05-12 5:16 ` Konstantin Khlebnikov
2014-05-12 7:50 ` Armin Rigo
2014-05-12 7:50 ` Armin Rigo
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=20140509181935.GA24841@node.dhcp.inet.fi \
--to=kirill@shutemov.name \
--cc=akpm@linux-foundation.org \
--cc=arigo@tunes.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=torvalds@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.