Re: [PATCH 00/16] (Resend) Use get_personality()
From: Andrew Morton <[EMAIL PROTECTED]> Subject: Re: [PATCH 00/16] (Resend) Use get_personality() Date: Sat, 23 Feb 2008 11:16:29 -0800 Message-ID: <[EMAIL PROTECTED]> > On Sat, 23 Feb 2008 13:37:31 -0500 Christoph Hellwig <[EMAIL PROTECTED]> > wrote: > > > On Sat, Feb 23, 2008 at 12:27:10PM +0300, Alexey Dobriyan wrote: > > > > Use get_personality() can hide the task_struct internals a bit. > > > > > > ->personality is going to become something less trivial? > > > Sorry, but you sound like C++ people writing tons of pointless get/set > > > wrappers. And your get_personality() is worse -- C++ would write it as > > > > > > current->personality() > > > > > > and again, even here, it's immediately visible that current task is > > > involved, not some other task. > > > > Yes, completely agreement. While I might have introduced this gem > > back then it is entirely stupid if you think about it. Please send > > patches to kill get_personality and just use current->personality > > instead. > > > > yup. > > We'll generally only add wrappers of this form if we need to provide > alternative implementations, or if we expect that we shall do so in the > future. > Ok. I will send a patch to remove it. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 00/16] (Resend) Use get_personality()
On Sat, 23 Feb 2008 13:37:31 -0500 Christoph Hellwig <[EMAIL PROTECTED]> wrote: > On Sat, Feb 23, 2008 at 12:27:10PM +0300, Alexey Dobriyan wrote: > > > Use get_personality() can hide the task_struct internals a bit. > > > > ->personality is going to become something less trivial? > > Sorry, but you sound like C++ people writing tons of pointless get/set > > wrappers. And your get_personality() is worse -- C++ would write it as > > > > current->personality() > > > > and again, even here, it's immediately visible that current task is > > involved, not some other task. > > Yes, completely agreement. While I might have introduced this gem > back then it is entirely stupid if you think about it. Please send > patches to kill get_personality and just use current->personality > instead. > yup. We'll generally only add wrappers of this form if we need to provide alternative implementations, or if we expect that we shall do so in the future. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 00/16] (Resend) Use get_personality()
On Sat, Feb 23, 2008 at 12:27:10PM +0300, Alexey Dobriyan wrote: > > Use get_personality() can hide the task_struct internals a bit. > > ->personality is going to become something less trivial? > Sorry, but you sound like C++ people writing tons of pointless get/set > wrappers. And your get_personality() is worse -- C++ would write it as > > current->personality() > > and again, even here, it's immediately visible that current task is > involved, not some other task. Yes, completely agreement. While I might have introduced this gem back then it is entirely stupid if you think about it. Please send patches to kill get_personality and just use current->personality instead. Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 00/16] (Resend) Use get_personality()
From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: Re: [PATCH 00/16] (Resend) Use get_personality() Date: Sat, 23 Feb 2008 12:27:10 +0300 Message-ID: <[EMAIL PROTECTED]> > On Sat, Feb 23, 2008 at 04:59:44PM +0800, WANG Cong wrote: > > From: Alexey Dobriyan <[EMAIL PROTECTED]> > > Subject: Re: [PATCH 00/16] (Resend) Use get_personality() > > > > On Sat, Feb 23, 2008 at 04:14:03PM +0800, WANG Cong wrote: > > > > This patchset makes the macro get_personality function alike > > > > and teaches code to use get_personality() instead of explicit > > > > reference. > > > > > > > > [I am sorry if you've received multiple copied of this, since > > > > my git-send-email doesn't work well. ] > > > > > > Yes, but why? "current->personality" is way more understandable than > > > your macro because task subject to dereference is very visible. > > > > Use get_personality() can hide the task_struct internals a bit. > > ->personality is going to become something less trivial? > Sorry, but you sound like C++ people writing tons of pointless get/set > wrappers. And your get_personality() is worse -- C++ would write it as > > current->personality() > > and again, even here, it's immediately visible that current task is > involved, not some other task. > Can't get_personality() mean getting the personality of current task? Or you want a more generic macro like this? #define get_task_personality(tsk) ((tsk)->personality) No, that is _too_ generic. Look at the code, (nearly) all references to 'personality' are via 'current'. So get_personality() is enough. I am not a fan of C++, I know that sometimes the get/set method in C++ is really a bit pointless, but, of course, *not* all the times. Regards. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 00/16] (Resend) Use get_personality()
On Sat, Feb 23, 2008 at 04:59:44PM +0800, WANG Cong wrote: > From: Alexey Dobriyan <[EMAIL PROTECTED]> > Subject: Re: [PATCH 00/16] (Resend) Use get_personality() > > On Sat, Feb 23, 2008 at 04:14:03PM +0800, WANG Cong wrote: > > > This patchset makes the macro get_personality function alike > > > and teaches code to use get_personality() instead of explicit > > > reference. > > > > > > [I am sorry if you've received multiple copied of this, since > > > my git-send-email doesn't work well. ] > > > > Yes, but why? "current->personality" is way more understandable than > > your macro because task subject to dereference is very visible. > > Use get_personality() can hide the task_struct internals a bit. ->personality is going to become something less trivial? Sorry, but you sound like C++ people writing tons of pointless get/set wrappers. And your get_personality() is worse -- C++ would write it as current->personality() and again, even here, it's immediately visible that current task is involved, not some other task. > And I don't think using the macro to access it is less understandable. > Since 'current' won't be NULL, whether the dereference is visible is > not important. It's not about NULL vs non-NULL at all. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 00/16] (Resend) Use get_personality()
From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: Re: [PATCH 00/16] (Resend) Use get_personality() Date: Sat, 23 Feb 2008 11:51:01 +0300 Message-ID: <[EMAIL PROTECTED]> > On Sat, Feb 23, 2008 at 04:14:03PM +0800, WANG Cong wrote: > > This patchset makes the macro get_personality function alike > > and teaches code to use get_personality() instead of explicit > > reference. > > > > [I am sorry if you've received multiple copied of this, since > > my git-send-email doesn't work well. ] > > Yes, but why? "current->personality" is way more understandable than > your macro because task subject to dereference is very visible. Use get_personality() can hide the task_struct internals a bit. And I don't think using the macro to access it is less understandable. Since 'current' won't be NULL, whether the dereference is visible is not important. Regards. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 00/16] (Resend) Use get_personality()
On Sat, Feb 23, 2008 at 04:14:03PM +0800, WANG Cong wrote: > This patchset makes the macro get_personality function alike > and teaches code to use get_personality() instead of explicit > reference. > > [I am sorry if you've received multiple copied of this, since > my git-send-email doesn't work well. ] Yes, but why? "current->personality" is way more understandable than your macro because task subject to dereference is very visible. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 00/16] (Resend) Use get_personality()
This patchset makes the macro get_personality function alike and teaches code to use get_personality() instead of explicit reference. [I am sorry if you've received multiple copied of this, since my git-send-email doesn't work well. ] Signed-off-by: WANG Cong <[EMAIL PROTECTED]> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/