* Need for KEXEC_PRESERVE_CONTEXT flag ?
@ 2009-06-19 6:30 Indraneel Mukherjee
2009-06-21 17:17 ` Neil Horman
0 siblings, 1 reply; 4+ messages in thread
From: Indraneel Mukherjee @ 2009-06-19 6:30 UTC (permalink / raw)
To: kexec
[-- Attachment #1.1: Type: text/plain, Size: 426 bytes --]
Hi,
The file kernel/kexec.c (~ line 1001 in linux-2.6.30) has this code
------snip----
if (flags & KEXEC_PRESERVE_CONTEXT)
image->preserve_context = 1;
------snip----
Will this ever be true? The flag KEXEC_PRESERVE_CONTEXT is not even defined
in kexec-tools-2.0.0.
Consequently, all the code inside the condition if(image->preserve_context)
is also useless?
Am i missing something here?
Regards,
Indro
[-- Attachment #1.2: Type: text/html, Size: 507 bytes --]
[-- Attachment #2: Type: text/plain, Size: 143 bytes --]
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Need for KEXEC_PRESERVE_CONTEXT flag ? 2009-06-19 6:30 Need for KEXEC_PRESERVE_CONTEXT flag ? Indraneel Mukherjee @ 2009-06-21 17:17 ` Neil Horman 2009-06-21 18:54 ` Indraneel Mukherjee 0 siblings, 1 reply; 4+ messages in thread From: Neil Horman @ 2009-06-21 17:17 UTC (permalink / raw) To: Indraneel Mukherjee; +Cc: kexec On Fri, Jun 19, 2009 at 12:00:44PM +0530, Indraneel Mukherjee wrote: > Hi, > > The file kernel/kexec.c (~ line 1001 in linux-2.6.30) has this code > > ------snip---- > > if (flags & KEXEC_PRESERVE_CONTEXT) > image->preserve_context = 1; > > ------snip---- > > Will this ever be true? The flag KEXEC_PRESERVE_CONTEXT is not even defined > in kexec-tools-2.0.0. > > Consequently, all the code inside the condition if(image->preserve_context) > is also useless? > > Am i missing something here? > Yes, the code you're looking at in the first definition is part of the kernel, while you're looking for the definition of KEXEC_PRESERVE_CONTEXT in the kexec-tools userspace code. You need to look for the definition of KEXEC_PRESERVE_CONTEXT in the kernel code (you'll find it in include/linux/kexec.h). kexec-tools might use it one day, but not using it doesn't mean we should remove it from the kernel. Neil > Regards, > Indro > _______________________________________________ > kexec mailing list > kexec@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/kexec _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Need for KEXEC_PRESERVE_CONTEXT flag ? 2009-06-21 17:17 ` Neil Horman @ 2009-06-21 18:54 ` Indraneel Mukherjee 2009-06-22 1:17 ` Neil Horman 0 siblings, 1 reply; 4+ messages in thread From: Indraneel Mukherjee @ 2009-06-21 18:54 UTC (permalink / raw) To: Neil Horman; +Cc: kexec [-- Attachment #1.1: Type: text/plain, Size: 1646 bytes --] On Sun, Jun 21, 2009 at 10:47 PM, Neil Horman <nhorman@redhat.com> wrote: > On Fri, Jun 19, 2009 at 12:00:44PM +0530, Indraneel Mukherjee wrote: > > Hi, > > > > The file kernel/kexec.c (~ line 1001 in linux-2.6.30) has this code > > > > ------snip---- > > > > if (flags & KEXEC_PRESERVE_CONTEXT) > > image->preserve_context = 1; > > > > ------snip---- > > > > Will this ever be true? The flag KEXEC_PRESERVE_CONTEXT is not even > defined > > in kexec-tools-2.0.0. > > > > Consequently, all the code inside the condition > if(image->preserve_context) > > is also useless? > > > > Am i missing something here? > > > Yes, the code you're looking at in the first definition is part of the > kernel, > while you're looking for the definition of KEXEC_PRESERVE_CONTEXT in the > kexec-tools userspace code. You need to look for the definition of > KEXEC_PRESERVE_CONTEXT in the kernel code (you'll find it in > include/linux/kexec.h). I've seen that bit. I was only trying to understand that code & figure out when does it ever gets executed. My guess is that kexec-tools is the only user of all the code in kernel/kexec.c. So, i started wondering if kexec-tools never sets the flag KEXEC_PRESERVE_CONTEXT, then why was that code even written? Ans that means we've got some untested code in the kernel :) ? Regards, Indro kexec-tools might use it one day, but not using it > doesn't mean we should remove it from the kernel. > > > Neil > > > Regards, > > Indro > > > _______________________________________________ > > kexec mailing list > > kexec@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/kexec > > [-- Attachment #1.2: Type: text/html, Size: 2625 bytes --] [-- Attachment #2: Type: text/plain, Size: 143 bytes --] _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Need for KEXEC_PRESERVE_CONTEXT flag ? 2009-06-21 18:54 ` Indraneel Mukherjee @ 2009-06-22 1:17 ` Neil Horman 0 siblings, 0 replies; 4+ messages in thread From: Neil Horman @ 2009-06-22 1:17 UTC (permalink / raw) To: Indraneel Mukherjee; +Cc: kexec On Mon, Jun 22, 2009 at 12:24:05AM +0530, Indraneel Mukherjee wrote: > On Sun, Jun 21, 2009 at 10:47 PM, Neil Horman <nhorman@redhat.com> wrote: > > > On Fri, Jun 19, 2009 at 12:00:44PM +0530, Indraneel Mukherjee wrote: > > > Hi, > > > > > > The file kernel/kexec.c (~ line 1001 in linux-2.6.30) has this code > > > > > > ------snip---- > > > > > > if (flags & KEXEC_PRESERVE_CONTEXT) > > > image->preserve_context = 1; > > > > > > ------snip---- > > > > > > Will this ever be true? The flag KEXEC_PRESERVE_CONTEXT is not even > > defined > > > in kexec-tools-2.0.0. > > > > > > Consequently, all the code inside the condition > > if(image->preserve_context) > > > is also useless? > > > > > > Am i missing something here? > > > > > Yes, the code you're looking at in the first definition is part of the > > kernel, > > while you're looking for the definition of KEXEC_PRESERVE_CONTEXT in the > > kexec-tools userspace code. You need to look for the definition of > > KEXEC_PRESERVE_CONTEXT in the kernel code (you'll find it in > > include/linux/kexec.h). > > > I've seen that bit. I was only trying to understand that code & figure out > when does it ever gets executed. My guess is that kexec-tools is the only > user of all the code in kernel/kexec.c. So, i started wondering if > kexec-tools never sets the flag KEXEC_PRESERVE_CONTEXT, then why was that > code even written? > Ans that means we've got some untested code in the kernel :) ? > Technically, you're correct, the code doesn't ever get used because the very limited set of tools that make use of the kexec infrastructure doesn't make use of it (yet). That said, just because nothing uses it in user space, doesn't mean that it won't. And if its not in the kernel first, userspace won't ever get to use it :) I guess the bottom line is, yeah its not used right now, but thats more of an impetus for kexec-tools to write code to take advantage of it, rather than for the kernel to remove it :) Neil > Regards, > Indro > > > > kexec-tools might use it one day, but not using it > > doesn't mean we should remove it from the kernel. > > > > > > > Neil > > > > > Regards, > > > Indro > > > > > _______________________________________________ > > > kexec mailing list > > > kexec@lists.infradead.org > > > http://lists.infradead.org/mailman/listinfo/kexec > > > > _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-06-22 1:18 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-06-19 6:30 Need for KEXEC_PRESERVE_CONTEXT flag ? Indraneel Mukherjee 2009-06-21 17:17 ` Neil Horman 2009-06-21 18:54 ` Indraneel Mukherjee 2009-06-22 1:17 ` Neil Horman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox