Skip to contentSkip to conversation

unexport complete_all

PATCH Mike Waychison 5 participants 12 messages Mar 4, 2005 – Mar 8, 2005

lore
Share & tools
lore
#0 lore raw
Quoted 7 lines

I didn't find any possible modular usage in the kernel.

kernel/sched.c

Quoted 8 lines
kernel/sched.c renamed from kernel/sched.c.old +0 -2
@@ -3053,7 +3053,6 @@
 			 0, 0, NULL);
 	spin_unlock_irqrestore(&x->wait.lock, flags);
 }
-EXPORT_SYMBOL(complete_all);
 
 void fastcall __sched wait_for_completion(struct completion *x)
 {
-

This is a valid piece of API that is exported for future use.

Please stop blindly posting patches for unexports that make the APIs half available.

--
Mike Waychison

#1 lore raw
Quoted 12 lines · Mike Waychison
Quoted 12 lines

I didn't find any possible modular usage in the kernel.

kernel/sched.c 2005-03-04 01:04:34.000000000 +0100 renamed from kernel/sched.c.old 2005-03-04 01:04:28.000000000 +0100 +0 -1
@@ -3053,7 +3053,6 @@
                       0, 0, NULL);
      spin_unlock_irqrestore(&x->wait.lock, flags);
 }
-EXPORT_SYMBOL(complete_all);
 
Quoted 5 lines

kernel/sched.c 2005-03-04 01:04:34.000000000 +0100

Quoted 3 lines
kernel/sched.c 2005-03-04 01:04:34.000000000 +0100 renamed from kernel/sched.c.old 2005-03-04 01:04:28.000000000 +0100 +0 -1
 void fastcall __sched wait_for_completion(struct completion *x)
 {
-

This is a valid piece of API that is exported for future use.

Let me guess: autofsng?

It was you who added it (through akpm):

[PATCH] export complete_all()

From: Mike Waychison <[email protected]>

Export complete_all for module use.

Andrew, what is the policy for adding exports for out of tree GPL code?

IMHO although it is convenient for maintainers of such code it is inconvenient for us (ie. when making changes to code) and gives people false assumptions about stability of *in-kernel* APIs.

Bartlomiej

#2 lore raw
Quoted 13 lines · Bartlomiej Zolnierkiewicz
Quoted 12 lines · Mike Waychison
Quoted 12 lines

I didn't find any possible modular usage in the kernel.

kernel/sched.c 2005-03-04 01:04:34.000000000 +0100 renamed from kernel/sched.c.old 2005-03-04 01:04:28.000000000 +0100 +0 -1
@@ -3053,7 +3053,6 @@
                       0, 0, NULL);
      spin_unlock_irqrestore(&x->wait.lock, flags);
 }
-EXPORT_SYMBOL(complete_all);
 
Quoted 8 lines
Quoted 5 lines

kernel/sched.c 2005-03-04 01:04:34.000000000 +0100

Quoted 3 lines
kernel/sched.c 2005-03-04 01:04:34.000000000 +0100 renamed from kernel/sched.c.old 2005-03-04 01:04:28.000000000 +0100 +0 -1
 void fastcall __sched wait_for_completion(struct completion *x)
 {
-

This is a valid piece of API that is exported for future use.

Let me guess: autofsng?
...

I grepped through autofsng-0.4 but didn't find any usage.

Quoted 1 line

Bartlomiej

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#3 lore raw
Quoted 23 lines · Bartlomiej Zolnierkiewicz
Quoted 22 lines
Quoted 5 lines · Mike Waychison
Quoted 5 lines

I didn't find any possible modular usage in the kernel.

--- linux-2.6.11-rc5-mm1-full/kernel/sched.c.old 2005-03-04

01:04:28.000000000 +0100

Quoted 1 line
Quoted 1 line

+++ linux-2.6.11-rc5-mm1-full/kernel/sched.c 2005-03-04

01:04:34.000000000 +0100

Quoted 11 lines

Review

Quoted 9 lines
(quoted diff) +0 -2
@@ -3053,7 +3053,6 @@
                       0, 0, NULL);
      spin_unlock_irqrestore(&x->wait.lock, flags);
 }
-EXPORT_SYMBOL(complete_all);
 
 void fastcall __sched wait_for_completion(struct completion *x)
 {
-

This is a valid piece of API that is exported for future use.

Quoted 4 lines
Quoted 2 lines

Let me guess: autofsng?
...

I grepped through autofsng-0.4 but didn't find any usage.

Did you just blindly grep the userspace tarball?

There is no kernel code in there. It's all in linux-2.6.*-autofsng-*.patch.

Mike Waychison

#4 lore raw
Quoted 4 lines · On Fri, Mar 04, 2005 at 12:08:33PM -0500, [email protected] wrote:

Did you just blindly grep the userspace tarball?

There is no kernel code in there. It's all in linux-2.6.*-autofsng-*.patch.

Sorry, my bad.

I couldn't connect to your FTP server this morning (I don't know why) and I found the wrong file with Google.

This makes my patch void.

Quoted 1 line

Mike Waychison

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#5 lore raw
In reply to Bartlomiej Zolnierkiewicz
Quoted 3 lines · Bartlomiej Zolnierkiewicz

Andrew, what is the policy for adding exports for out of tree GPL code?

There isn't one. Such things cause way too much email.

What complete_all() does is to permit more than one task to wait on a completion and for all those tasks to be woken by a single complete(). Without it you'd need to record how many tasks are sleeping there and do complete() that many times.

So it's a sensible part of the completion API from a regularity-of-the-API POV. We use it in the coredump code and I don't think we'd be likely to want to rip it out.

In fact, I'd say that complete() should have always done it this way...

#6 lore raw
Quoted 5 lines · Andrew Morton

...
So it's a sensible part of the completion API from a regularity-of-the-API POV. We use it in the coredump code and I don't think we'd be likely to want to rip it out.
...

Modular coredump code?

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#7 lore raw
In reply to Andrew Morton
Quoted 6 lines · Andrew Morton
Quoted 3 lines · Bartlomiej Zolnierkiewicz

Andrew, what is the policy for adding exports for out of tree GPL code?

There isn't one. Such things cause way too much email.

Lack of policy causes the same thing (ie. this thread).

Quoted 6 lines

What complete_all() does is to permit more than one task to wait on a completion and for all those tasks to be woken by a single complete(). Without it you'd need to record how many tasks are sleeping there and do complete() that many times.

So it's a sensible part of the completion API from a regularity-of-the-API

This function was already part of in-kernel API, just wasn't exported for modules because there were no in-kernel users.

Quoted 2 lines

POV. We use it in the coredump code and I don't think we'd be likely to want to rip it out.

OK, I understand that the unwritten policy is the following:
symbols for out-of-tree code used by OSDL are fine. 8)

Quoted 1 line

In fact, I'd say that complete() should have always done it this way...

#8 lore raw
Quoted 15 lines · Bartlomiej Zolnierkiewicz
Quoted 6 lines · Andrew Morton
Quoted 3 lines · Bartlomiej Zolnierkiewicz

Andrew, what is the policy for adding exports for out of tree GPL code?

There isn't one. Such things cause way too much email.

Lack of policy causes the same thing (ie. this thread).

Quoted 5 lines

What complete_all() does is to permit more than one task to wait on a completion and for all those tasks to be woken by a single complete(). Without it you'd need to record how many tasks are sleeping there and do complete() that many times.

Quoted 7 lines
Quoted 1 line

So it's a sensible part of the completion API from a regularity-of-the-API

This function was already part of in-kernel API, just wasn't exported for modules because there were no in-kernel users.

Quoted 2 lines

POV. We use it in the coredump code and I don't think we'd be likely to want to rip it out.

It was my misunderstanding w.r.t. 'We' here...

Quoted 2 lines

OK, I understand that the unwritten policy is the following:
symbols for out-of-tree code used by OSDL are fine. 8)

/me takes this bad joke back and says sorry to Andrew

Quoted 1 line
Quoted 1 line

In fact, I'd say that complete() should have always done it this way...

#9 lore raw
In reply to Bartlomiej Zolnierkiewicz
Quoted 5 lines

Andrew, what is the policy for adding exports for out of tree GPL code?

IMHO although it is convenient for maintainers of such code it is inconvenient for us (ie. when making changes to code) and gives people false assumptions about stability of *in-kernel* APIs.

Why isn't it _GPL if it is for a specific module need ?

Even more so for those cases where a person adds a non _GPL export for another persons code.

#10 lore raw
In reply to Mike Waychison
Quoted 12 lines · Mike Waychison
Quoted 12 lines

I didn't find any possible modular usage in the kernel.

kernel/sched.c renamed from kernel/sched.c.old +0 -1
@@ -3053,7 +3053,6 @@
 			 0, 0, NULL);
 	spin_unlock_irqrestore(&x->wait.lock, flags);
 }
-EXPORT_SYMBOL(complete_all);
 
Quoted 6 lines

kernel/sched.c

Quoted 3 lines
kernel/sched.c renamed from kernel/sched.c.old +0 -1
 void fastcall __sched wait_for_completion(struct completion *x)
 {
-

This is a valid piece of API that is exported for future use.
...

You exported this function nearly one year ago with the only comment "Export complete_all for module use.".

Why did you add the export last year instead of simply adding it when it will be required?

Quoted 1 line

Mike Waychison

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#11 lore raw
Quoted 22 lines · Mike Waychison
Quoted 14 lines
Quoted 5 lines

I didn't find any possible modular usage in the kernel.

--- linux-2.6.11-rc5-mm1-full/kernel/sched.c.old 2005-03-04

01:04:28.000000000 +0100

Quoted 1 line

+++ linux-2.6.11-rc5-mm1-full/kernel/sched.c 2005-03-04

01:04:34.000000000 +0100

Quoted 6 lines
(quoted diff) +0 -1
@@ -3053,7 +3053,6 @@
 			 0, 0, NULL);
 	spin_unlock_irqrestore(&x->wait.lock, flags);
 }
-EXPORT_SYMBOL(complete_all);
 
Quoted 6 lines

Review

Quoted 3 lines
(quoted diff) +0 -1
 void fastcall __sched wait_for_completion(struct completion *x)
 {
-

This is a valid piece of API that is exported for future use.
...

Quoted 6 lines

You exported this function nearly one year ago with the only comment "Export complete_all for module use.".

Why did you add the export last year instead of simply adding it when it will be required?

Because it makes no sense to export only part of an API-set. A good interface should be as consistent as possible; selectively choosing what is available for modular use fails this requirement.

The original patch was sent as I believed the lack of an exported complete_all was purely an oversight.

Mike Waychison