6V motor powered by a 24V battery

In general, motors don't want very high pwm. I would stay within 1khz if I were you.

I will also add that much more than 4x energy goes into the motor at 24v than at 6v, particularly when the motor is revolving at speed closer to its no-load rpm at 6v. As such, I would put 25% @ 24v as the upper end as an approximation to 100% @ 6v.

If you want to find out the exact answer, you may have to experiment.