All of lore.kernel.org
 help / color / mirror / Atom feed
From: james_p_freyensee@linux.intel.com
To: "Christoph Hellwig" <hch@infradead.org>
Cc: james_p_freyensee@linux.intel.com,
	"Christoph Hellwig" <hch@infradead.org>,
	gregkh@suse.de, linux-kernel@vger.kernel.org,
	suhail.ahmed@intel.com
Subject: Re: [PATCH 01/12] export kernel call get_task_comm()
Date: Tue, 8 Feb 2011 12:35:35 -0800 (PST)	[thread overview]
Message-ID: <58187.10.23.16.85.1297197335.squirrel@linux.intel.com> (raw)
In-Reply-To: <20110208200444.GA23329@infradead.org>

> On Tue, Feb 08, 2011 at 11:44:16AM -0800,
> james_p_freyensee@linux.intel.com wrote:
>> That is originally what I did, but after talking with Greg KH, Arjan
>> vdv,
>> and Alan Cox I made this patch instead.
>
> Care to explain why exactly?
>
>

If I can jog my own memory as this was a while ago...

Well for starters, Arjan van de Ven first suggested it, and I trust his
judgement because of his Linux kernel experience.

But looking at the code, the kernel function get_task_comm() provides a
level of safety with a lock, so the global resource 'current' can be used
without someone else trying to use it at the same time.  And using this
function facilitates code reuse which is something Greg KH was trying to
point out to me at the time:

http://lists.meego.com/pipermail/meego-kernel/2010-October/000823.html

In fact, I remember finding existing, accepted drivers in the kernel that
wrote their own locks before accessing current (I quickly just now found
block/dfdb/drbd_main.c as an example), so Greg is making a valid point
about code reuse.  So not exporting get_task_comm() encourages code
locking re-write of every driver that wants to access 'current'.

In that email, Greg clearly reminded me my goal is to get my work into the
kernel.  Thus, I listened to their advice and made this patch.

  reply	other threads:[~2011-02-08 20:35 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-08 19:34 Resend: Request for review and addition of PTI implementation into kernel james_p_freyensee
2011-02-08 19:34 ` [PATCH 01/12] export kernel call get_task_comm() james_p_freyensee
2011-02-08 19:34   ` [PATCH 02/12] Kernel documentation for the PTI feature james_p_freyensee
2011-02-08 19:34     ` [PATCH 03/12] Intel PTI implementaiton of 1149 james_p_freyensee
2011-02-08 19:34       ` [PATCH 04/12] PTI Kconfig change in misc james_p_freyensee
2011-02-08 19:34         ` [PATCH 05/12] PTI misc Makefile addition james_p_freyensee
2011-02-08 19:34           ` [PATCH 06/12] PTI header file james_p_freyensee
2011-02-08 19:34             ` [PATCH 07/12] n_tracerouter and n_tracesink additions james_p_freyensee
2011-02-08 19:34               ` [PATCH 08/12] n_tracesink ldisc addition james_p_freyensee
2011-02-08 19:34                 ` [PATCH 09/12] n_tracesink header file james_p_freyensee
2011-02-08 19:34                   ` [PATCH 10/12] n_tracerouter ldisc driver james_p_freyensee
2011-02-08 19:34                     ` [PATCH 11/12] n_tracerouter and n_tracesink Kconfig james_p_freyensee
2011-02-08 19:34                       ` [PATCH 12/12] n_tracerouter and n_tracesink Makefile addition james_p_freyensee
2011-02-08 21:03                       ` [PATCH 11/12] n_tracerouter and n_tracesink Kconfig Randy Dunlap
2011-02-17 19:23                   ` [PATCH 09/12] n_tracesink header file Greg KH
2011-02-17 19:45                     ` J Freyensee
2011-02-17 19:54                       ` Greg KH
2011-02-17 20:10                         ` J Freyensee
2011-02-17 21:43                           ` Greg KH
2011-02-22 20:22                             ` J Freyensee
2011-02-22 20:26                               ` Greg KH
2011-02-22 22:55                                 ` J Freyensee
2011-02-17 19:21               ` [PATCH 07/12] n_tracerouter and n_tracesink additions Greg KH
2011-02-17 19:43                 ` J Freyensee
2011-02-17 19:54                   ` Greg KH
2011-02-17 20:11                     ` J Freyensee
2011-02-24 11:52                   ` Alan Cox
2011-02-17 19:20             ` [PATCH 06/12] PTI header file Greg KH
2011-02-17 19:41               ` J Freyensee
2011-02-17 19:55                 ` Greg KH
2011-02-17 20:13                   ` J Freyensee
2011-02-17 19:20         ` [PATCH 04/12] PTI Kconfig change in misc Greg KH
2011-02-17 19:35           ` J Freyensee
2011-02-17 19:45             ` Greg KH
2011-02-08 20:55     ` [PATCH 02/12] Kernel documentation for the PTI feature Randy Dunlap
2011-02-08 19:38   ` [PATCH 01/12] export kernel call get_task_comm() Christoph Hellwig
2011-02-08 19:44     ` james_p_freyensee
2011-02-08 20:04       ` Christoph Hellwig
2011-02-08 20:35         ` james_p_freyensee [this message]
2011-02-08 20:28       ` Alan Cox
2011-02-08 20:28         ` Christoph Hellwig
2011-02-08 20:36           ` Alan Cox
2011-02-15 10:57             ` Christoph Hellwig
2011-02-22 18:38   ` J Freyensee
2011-02-22 18:41     ` Greg KH

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=58187.10.23.16.85.1297197335.squirrel@linux.intel.com \
    --to=james_p_freyensee@linux.intel.com \
    --cc=gregkh@suse.de \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suhail.ahmed@intel.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 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.