ANDURIL USER MANUAL

100 posts / 0 new
Last post
HKSJOSHUA_
Offline
Last seen: 1 hour 37 min ago
Joined: 06/28/2019 - 01:25
Posts: 76
Location: OKC

Anyone know how to reset a d4v2?

I read somewhere that this will delete muggle mode and is what I would like to accomplish, I have some harbor freight flashlights to lend to muggles during camping trips, etc

ZozzV6
ZozzV6's picture
Offline
Last seen: 16 min 43 sec ago
Joined: 03/24/2016 - 12:19
Posts: 2315
Location: Near to my soldering iron.

HKSJOSHUA_ wrote:
Anyone know how to reset a d4v2?

I read somewhere that this will delete muggle mode and is what I would like to accomplish, I have some harbor freight flashlights to lend to muggles during camping trips, etc

Untwist tailcap to lockout mechanically. Press and hold button andwhile holding tighten tailcap. Still hold the button for about 3 seconds while the light blinking something. Then when it is ramping up it is done.

SammysHP
SammysHP's picture
Online
Last seen: 1 min 42 sec ago
Joined: 06/25/2019 - 14:35
Posts: 102
Location: Germany

But that will not delete the muggle mode.

HKSJOSHUA_
Offline
Last seen: 1 hour 37 min ago
Joined: 06/28/2019 - 01:25
Posts: 76
Location: OKC

Thanks as for the muggle mode its cool for what it is so it can stay I have no choice lol

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 2 hours 1 min ago
Joined: 01/12/2013 - 14:40
Posts: 9963
Location: (469219) 2016 HO3
d_t_a wrote:
Lumintop does use new firmware on the FW3A when it’s available (unlike on the BLF Q8 and I think Sofirn Q8, even their latest batches apparently still use NarsilM v1.0, instead of NarsilM v1.2)

That’s because I keep sending new files to Lumintop. Wink

I generally send new files periodically to every manufacturer using Anduril. Some update their drivers, some don’t. I think it mostly depends on how much old stock is waiting to be sold… like, if they still have 3000 drivers with old firmware, they generally won’t update it. But if it’s just a few left, the next batch is usually made with newer firmware.

ApostatePipe
ApostatePipe's picture
Offline
Last seen: 1 week 2 days ago
Joined: 09/22/2019 - 12:42
Posts: 9
Location: Utah, USA

Hopefully I’m not commenting on this too late and reviving the thread. I just got my first enthusiast light (FW3T) and I’m super impressed with the UI. I do have one question, however. When activating candle mode (click, click, hold) is the default setting for it to go until the user turns it off? If that is correct, then 3 clicks will make it thirty minutes with +30 minutes with each subsequent 3 clicks?

atobe
Online
Last seen: 3 min 21 sec ago
Joined: 09/14/2019 - 23:27
Posts: 70
Location: California
ApostatePipe wrote:
Hopefully I’m not commenting on this too late and reviving the thread. I just got my first enthusiast light (FW3T) and I’m super impressed with the UI. I do have one question, however. When activating candle mode (click, click, hold) is the default setting for it to go until the user turns it off? If that is correct, then 3 clicks will make it thirty minutes with +30 minutes with each subsequent 3 clicks?

Default of candle is run until you turn it off or go to another mode. 3 clicks while in candle mode and the light will give you an acknowledge blink that adds 30 minutes and it’ll turn off by itself when timer is up. I’m not sure how many you can add, I’ve never tried more than once. ToyKeeper will know that part.

__o
_`\<,_
(_)/ (_)

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 2 hours 1 min ago
Joined: 01/12/2013 - 14:40
Posts: 9963
Location: (469219) 2016 HO3

The candle timer can go up to about 255 “pseudo minutes”. The details don’t really matter much, but it uses an internal unit which is a bit longer than a minute… and it can represent something like 4.6 or 4.7 hours before overflowing, so it’ll let the user set a timer up to that long. If the current timer +30m is too long, it’ll refuse to add any more.

Anyway, TL;DR: candle timer can go up to about 4.5 hours.

If the timer isn’t set, it’ll go until the user turns it off or until low-voltage protection sends a warning. In the LVP scenario, it goes to a low steady mode, then proceeds through the usual repeated-step-down and turn-off it would do in a regular ramping mode.

Each time candle mode is started, the timer is reset to “none”. So if you set a timer and then cancel it by turning the light off, it won’t remember or resume next time… it’ll start from zero again.

ApostatePipe
ApostatePipe's picture
Offline
Last seen: 1 week 2 days ago
Joined: 09/22/2019 - 12:42
Posts: 9
Location: Utah, USA

ToyKeeper wrote:
The candle timer can go up to about 255 “pseudo minutes”. The details don’t really matter much, but it uses an internal unit which is a bit longer than a minute… and it can represent something like 4.6 or 4.7 hours before overflowing, so it’ll let the user set a timer up to that long. If the current timer +30m is too long, it’ll refuse to add any more.

Anyway, TL;DR: candle timer can go up to about 4.5 hours.

If the timer isn’t set, it’ll go until the user turns it off or until low-voltage protection sends a warning. In the LVP scenario, it goes to a low steady mode, then proceeds through the usual repeated-step-down and turn-off it would do in a regular ramping mode.

Each time candle mode is started, the timer is reset to “none”. So if you set a timer and then cancel it by turning the light off, it won’t remember or resume next time… it’ll start from zero again.

Excellent. Thank you so much! You really did an amazing job on this UI. I always thought I just needed on/off and maybe high/low, but this has spoiled me!

One last question, I think. Is the low voltage cutoff adjustable? I generally like to keep my 18650’s above 3.3 volts if possible.

Lord_Polymath
Lord_Polymath's picture
Offline
Last seen: 1 day 15 hours ago
Joined: 09/19/2019 - 11:16
Posts: 49
Location: Arkansas, USA

ToyKeeper – I love this UI. Thank you for your work. Looking at the diagram, am I right in saying that if the light is off and you click and hold (1H) the brightness ramps up from floor to ceiling? And if you double click and hold (2H) the light ramps down from ceiling to floor? This is intuitive as a 2C gets you to max ramp from off – however I think for safety the ramping up from off (1H) should be swapped with the ramping down (2H). It would be far more likely that the button is depressed and held down while in a person’s pocket than being pressed twice in a row and held down.

Also in the diagram at the front of this thread in the Blinkies section I don’t understand how many clicks are needed to get from beacon to beacon cfg and tempcheck to thermal cfg. The dotted blue line means “other action” but it needs an indicator of how many times you click.

Also confused about the Ramp Cfg, Thermal Cfg, Beacon Cfg box. To get to Ramp cfg you click 4 times (has an arrow and “4 Clicks” in blue). Then below that it says Thermal Cfg and also has an arrow with “4 Clicks” in blue. Same for Beacon cfg. The “while on” box says 4C goes to ramp cfg but it is not clear why there is a “4 clicks” beside the thermal cfg and beacon cfg. Does that mean that while in Ramp Cfg you click 4 times to get to thermal cfg and then 4 more to get to beacon cfg?

ApostatePipe
ApostatePipe's picture
Offline
Last seen: 1 week 2 days ago
Joined: 09/22/2019 - 12:42
Posts: 9
Location: Utah, USA

Help! I somehow got it so when I’m in lockout mode, the the lights are flipped. Usually it’s moonlight, then slightly higher with two clicks and a hold. Now it’s opposite!

Edit: Turns out I had done something to the ramp mode. Now I’m trying to figure out how to configure the stepped ramp mode. How do I make it so that I have seven settings, with the bottom being not moonlight mode and the ceiling not turbo. Basically back to factory? I accidentally did one click at the first and second prompt, then no clicks at the third, setting it from moonlight to turbo. I thought I was configuring the smooth ramp…

sbslider
sbslider's picture
Offline
Last seen: 2 hours 50 sec ago
Joined: 01/22/2017 - 13:41
Posts: 1304
Location: United States

For some versions of Anduril (maybe all?) this is the factory reset procedure:

Loosen the battery tube to disconnect power.
Press and hold the button.
Tighten the battery tube to connect power.
Keep holding the button.
The light should pulse while getting slowly brighter.
The light then bursts to its brightest mode, and fades quickly to black.
Let go of the button during the fade to black.

give it a try and see if it works for you.

PocketSammich wrote: I don’t need this, but I want it. Please sign me up.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 2 hours 1 min ago
Joined: 01/12/2013 - 14:40
Posts: 9963
Location: (469219) 2016 HO3

The lockout momentary function uses the current ramp floor on the first press, and the other ramp floor on the second press. Then back to the current ramp floor for all other presses. So if your current ramp’s floor is higher than the other one, the brighter level goes first.

I’ve been considering changing this so it does the lowest one first instead of the current one first. However, this would make it less convenient for people who want the higher level first.

In any case, 3 clicks while on in a regular ramping mode should get it back. The idea is that, by default, the smooth ramp is configured for indoor use and the stepped ramp is configured for outdoor use. The lockout momentary function also changes its brightness to reflect this, so lockout is brighter when the light is in outdoor mode. But I’m not entirely sure that’s better than simply doing lowest first.

As for how to get it back to default settings, the easiest way is the factory reset function… if it’s new enough to have that. It’s pretty recent. If not, it depends on the individual model of light being configured. Different lights have different config settings. At a guess though, 20 clicks at the first prompt and 21 or 31 at the second prompt and then 7 at the third prompt. That should get the stepped ramp set to go from level 20 to 120 (or 130) in 7 steps.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 2 hours 1 min ago
Joined: 01/12/2013 - 14:40
Posts: 9963
Location: (469219) 2016 HO3
ApostatePipe wrote:
Is the low voltage cutoff adjustable? I generally like to keep my 18650’s above 3.3 volts if possible.

It is adjustable if you build new firmware with a different LVP threshold, but otherwise no. To keep cells above 3.3V with stock firmware, you’d need to use the battery check mode once in a while to measure the voltage, then charge the batteries when they reach the desired level. I usually charge batteries when they get down to 3.3V or 3.4V, but I use battcheck to let me know when that is.

Lord_Polymath wrote:
if the light is off and you click and hold (1H) the brightness ramps up from floor to ceiling? And if you double click and hold (2H) the light ramps down from ceiling to floor? This is intuitive as a 2C gets you to max ramp from off – however I think for safety the ramping up from off (1H) should be swapped with the ramping down (2H). It would be far more likely that the button is depressed and held down while in a person’s pocket than being pressed twice in a row and held down.

Yes, “hold” ramps up from the bottom, while “press, release, hold” ramps down from the top.

In very recent versions, I added an additional safety check so if the button remains held for too long at the highest level, it ramps back down and stays down.

Lord_Polymath wrote:
Also in the diagram at the front of this thread in the Blinkies section I don’t understand how many clicks are needed …

… you click 4 times (has an arrow and “4 Clicks” in blue).

I think you may have just answered your own questions.

Go to the mode you want to configure, then click 4 times to access the corresponding config menu.

ApostatePipe
ApostatePipe's picture
Offline
Last seen: 1 week 2 days ago
Joined: 09/22/2019 - 12:42
Posts: 9
Location: Utah, USA
ToyKeeper wrote:
At a guess though, 20 clicks at the first prompt and 21 or 31 at the second prompt and then 7 at the third prompt. That should get the stepped ramp set to go from level 20 to 120 (or 130) in 7 steps.

That worked perfectly. Thank you very much!!!!! I’m to assume it is measured from 1-150 then?

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 2 hours 1 min ago
Joined: 01/12/2013 - 14:40
Posts: 9963
Location: (469219) 2016 HO3

Yes, the ramp internally has 150 brightness levels.

Lord_Polymath
Lord_Polymath's picture
Offline
Last seen: 1 day 15 hours ago
Joined: 09/19/2019 - 11:16
Posts: 49
Location: Arkansas, USA

ToyKeeper wrote:

Yes, “hold” ramps up from the bottom, while “press, release, hold” ramps down from the top.

In very recent versions, I added an additional safety check so if the button remains held for too long at the highest level, it ramps back down and stays down.

This is awesome! Thank you.

ToyKeeper wrote:
I think you may have just answered your own questions.

Go to the mode you want to configure, then click 4 times to access the corresponding config menu.

Ahh I understand now, but the diagram is still confusing. The blue dotted lines from tempcheck and beacon need to have a 4C. Everywhere else in the diagram there is a blue dotted line, the number of clicks is indicated, and they are not all the same. Sorry, it’s kind of hard to explain this stuff.

80T
80T's picture
Offline
Last seen: 19 hours 51 min ago
Joined: 01/24/2019 - 18:11
Posts: 161
Location: Romania/Ireland

Not sure where to ask this, but.. any chance Anduril would support drivers with only 7135's ? Let's say 3 or 4 of them for an XP-E / XP-G or up to 8 or so for your usual XP-L / XM-L or the likes ?

 

 

Regards.

SammysHP
SammysHP's picture
Online
Last seen: 1 min 42 sec ago
Joined: 06/25/2019 - 14:35
Posts: 102
Location: Germany

Yes, just calculate the ramps. Needs a microcontroller supported by Anduril, of course (at least ATtiny85).

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 2 hours 1 min ago
Joined: 01/12/2013 - 14:40
Posts: 9963
Location: (469219) 2016 HO3
80T wrote:
Not sure where to ask this, but.. any chance Anduril would support drivers with only 7135’s ? Let’s say 3 or 4 of them for an XP-E / XP-G or up to 8 or so for your usual XP-L / XM-L or the likes ?

Yes, it works fine on 7135-only drivers. It just needs the hwdef-*.h and cfg-*.h files configured accordingly.

It doesn’t really care much what type of chips are on each power channel. It just needs to know what kind of PWM signal to send them for a smooth and visually-linear ramp.

Mocarny
Mocarny's picture
Offline
Last seen: 1 hour 28 min ago
Joined: 05/10/2019 - 04:03
Posts: 113
Location: Poland

Recently I wanted to show FW1A to my mom and the first thing she did was clicking a bunch of times (because when she clicked once it turned on the lowest lewel, not visible, so she clicked 4 extra times “to turn it on for sure”), entered config mode and changed ramping levels… It’s my first Anduril light, so I spended an hour trying to figure out what happened.

And you know, 5 clicks is not that far away from 6 clicks – disabling Muggle mode. And children are clicking a bunch of times with no reason as well.

What do you think, would it be a good idea to change disabling Muggle mode from 6C to 6H?

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 2 hours 1 min ago
Joined: 01/12/2013 - 14:40
Posts: 9963
Location: (469219) 2016 HO3
Mocarny wrote:
would it be a good idea to change disabling Muggle mode from 6C to 6H?

That’s actually on the todo list, along with some other button mapping changes. I’ve just been trying to reach some sort of consensus about what to change before doing it, since there has also been feedback saying not to remap the buttons. Breaking backward UI compatibility can be an awkward and unpleasant process for everyone involved, even if the changes are probably an upgrade.

Some of the ideas…

  • Change 6C to 6H for muggle mode. Either both enter+exit, or for exit-only. Helps keep people from getting out by accident, and may also help people avoid getting in by accident.
  • Remove muggle mode entirely? It’s kind of bad and wastes a lot of space which could be used for other things. Or at least refactor it to make it more robust.
  • Add 4H from lockout for “exit lockout and immediately start ramping up from the floor”.
  • Make 4C from lockout turn the light on immediately? (meh)
  • Move config modes from 4C to 5C, and move the manual memory stuff from 5C/5H to 4C/4H. (makes config modes a bit harder to get into by accident, and makes memory control easier to access)
  • Remove beacon config mode and replace it with “hold to set timing”.

Plus some other things which could be nice if there’s room…

  • Sunset mode timer and brightness configuration
  • Auto-lock after being off for N minutes?

… but mostly I need to work on underlying stuff in FSM:

  • Completely rewrite how interrupts work
  • Make a thermal simulator
  • Rewrite the thermal code entirely
  • Replace the PWM-ramp-based brightness controls with a hybrid PWM-DSM method, if possible
  • Make a better method for doing smooth brightness adjustments
  • Refactor ramping logic into a single place for better consistency and reduced size
  • Fix the micro-timing of state-change events by putting them into the event queue instead of handling them immediately
  • Clean up how the hardware abstraction layer works
  • Clean up a bunch of messy and disorganized code
  • Add support for more MCUs
  • Add support for 4-channel tint mixing (currently only does 2-channel)
  • Add support for a second e-switch
  • Add support for clicky switches (mem-decay offtime, OTC offtime, OTSM offtime, fast-clicks tracking, etc)
  • Rewrite the button LED / aux LED / RGB LED code entirely to clean it up
  • Make a build system so all UIs are built and tested regularly
  • Update other UIs to support multiple build targets

And, of course, most of the low-level stuff there isn’t what I’d call fun. So it can be difficult to get a lot of it done.

80T
80T's picture
Offline
Last seen: 19 hours 51 min ago
Joined: 01/24/2019 - 18:11
Posts: 161
Location: Romania/Ireland

Yay! 2 e-switches + 1 Clicky.. Nice!

Mocarny
Mocarny's picture
Offline
Last seen: 1 hour 28 min ago
Joined: 05/10/2019 - 04:03
Posts: 113
Location: Poland

ToyKeeper wrote:

Some of the ideas…
  • Change 6C to 6H for muggle mode. Either both enter+exit, or for exit-only. Helps keep people from getting out by accident, and may also help people avoid getting in by accident.
  • Add 4H from lockout for “exit lockout and immediately start ramping up from the floor”.
  • Make 4C from lockout turn the light on immediately? (meh)
  • Move config modes from 4C to 5C, and move the manual memory stuff from 5C/5H to 4C/4H. (makes config modes a bit harder to get into by accident, and makes memory control easier to access)
  • Sunset mode timer and brightness configuration

Big YES for all!
ToyKeeper wrote:
Remove muggle mode entirely? It’s kind of bad and wastes a lot of space which could be used for other things. Or at least refactor it to make it more robust.

Maybe making it so there is only smooth ramping and strobes, all config options are locked and max brightness is the last memorized brightness used before entering this mode.

ToyKeeper wrote:

  • Make 4C from lockout turn the light on immediately? (meh)
  • Auto-lock after being off for N minutes?

Meh
ToyKeeper now wrote:
  • Add support for a second e-switch
  • Add support for clicky switches (mem-decay offtime, OTC offtime, OTSM offtime, fast-clicks tracking, etc)

  • ToyKeeper but after 20 years wrote:
  • Finally added support for 9 digit keyboard
  • Micro SIM now works properly – noise on the microphone when talking during candlelight mode has been fixed

  • Some ideas and suggestions after Mars terraforming:

    • Sending SOS and location coordinates after 5H instead of 5C in Space Exploration mode
    • Auto shut down on 10% of nuclear reactor power – to have that power in emergency

    80T
    80T's picture
    Offline
    Last seen: 19 hours 51 min ago
    Joined: 01/24/2019 - 18:11
    Posts: 161
    Location: Romania/Ireland

    Maybe it would be a good idea to just branch the fw in a couple of versions, just for the sake of consistency in the main branch and users that don't like change too much ?

     

    Something like..

     

    Anduril (Main)

    Anduril Alt (with the least.. "invasive" changes ?)

    Anduril Duo (Support for 2 e-switches)

    Anduril Duo C (Support for 2 e-switches and clicky)

     

    Just my 2C..

     

     

    Cheers!

    noboneshotdog
    Offline
    Last seen: 40 min 35 sec ago
    Joined: 05/12/2012 - 08:47
    Posts: 564
    Location: Hudson, New Hampshire

    Please don’t do smooth ramping only. The stepped helps me have a definitive level that I can always get to easily.

    Thier ain’t no bones in a hot dog. F. York

    Lord_Polymath
    Lord_Polymath's picture
    Offline
    Last seen: 1 day 15 hours ago
    Joined: 09/19/2019 - 11:16
    Posts: 49
    Location: Arkansas, USA

    Mocarny wrote:
    Recently I wanted to show FW1A to my mom and the first thing she did was clicking a bunch of times (because when she clicked once it turned on the lowest lewel, not visible, so she clicked 4 extra times “to turn it on for sure”), entered config mode and changed ramping levels… It’s my first Anduril light, so I spended an hour trying to figure out what happened.

    And you know, 5 clicks is not that far away from 6 clicks – disabling Muggle mode. And children are clicking a bunch of times with no reason as well.

    What do you think, would it be a good idea to change disabling Muggle mode from 6C to 6H?

    This really has me thinking. Most people have only ever used flashlights that click to turn on and maybe go through a couple brightness levels with additional clicks and then off. So it’s not surprising that if you handed someone an Anduril flashlight, they would start clicking away. They key here is communication. “Click once to turn it on, then click and hold to ramp up the brightness” is all it takes. Putting the light in Muggle mode before handing it over and giving the same verbal instructions is even better. Muggle mode is a selling point for me, please don’t remove it. I can see making it 6H for both enter and exit, but please don’t make it a different click sequence for exit than it is for enter. I will never give a child a flashlight capable of starting fires even with Muggle mode.
    Add 4H from lockout for “exit lockout and immediately start ramping up from the floor”. Love this idea!!

    Mocarny
    Mocarny's picture
    Offline
    Last seen: 1 hour 28 min ago
    Joined: 05/10/2019 - 04:03
    Posts: 113
    Location: Poland

    Quote:
    I will never give a child a flashlight capable of starting fires even with Muggle mode.

    It’s why my idea is to have the last memoried brightness as max brightness in Muggle mode. When giving it a child, you can set brightness to 50% and then 6H for Muggle mode, but when borrowing it to someone on camping, you can set 100% and then go to Muggle mode.
    ToyKeeper
    ToyKeeper's picture
    Offline
    Last seen: 2 hours 1 min ago
    Joined: 01/12/2013 - 14:40
    Posts: 9963
    Location: (469219) 2016 HO3
    80T wrote:
    Maybe it would be a good idea to just branch the fw in a couple of versions…

    There are already two official forks of Anduril — RampingIOS V3 and Fireflies UI. They don’t get updated much, since it’s kind of a pain merging changes back and forth between related forks, and because I often don’t really think about the other forks when making changes. Also, RampingIOS V3 has been abandoned by its sole stakeholder, so I haven’t bothered keeping it updated.

    noboneshotdog wrote:
    Please don’t do smooth ramping only. The stepped helps me have a definitive level that I can always get to easily.

    I have no intention of removing the stepped ramp. I use it too. I think the request was only about muggle mode though.

    Lord_Polymath wrote:
    please don’t make it a different click sequence for exit than it is for enter.

    I’m undecided on that one. The idea is, if the enter and exit sequences are different, it’s easier to help people who managed to get stuck in muggle mode. They can be told “just click 6 times, but hold the last click for a second or two”, and it will put them into a predictable state. But if the enter and exit sequences are the same, it can be much more confusing for both the person who is being helped and the person trying to help them.

    OTOH, mapping both to 6H means it’s unlikely people will get there by accident… so maybe there wouldn’t be as much need to help people who don’t know which mode they’re in.

    Mocarny wrote:
    ToyKeeper wrote:
    Remove muggle mode entirely? It’s kind of bad and wastes a lot of space which could be used for other things. Or at least refactor it to make it more robust.

    Maybe making it so there is only smooth ramping and strobes, all config options are locked and max brightness is the last memorized brightness used before entering this mode.

    I don’t really want to add features to muggle mode… if anything, I’d like to reduce it back to its original form — on/off only at ~100 lumens.

    Mocarny wrote:
    ToyKeeper but after 20 years wrote:

    If I’m still working on this in 20 years, the changes will probably require a lot of expertise to even understand. They’ll probably look somewhat like this…

    https://github.com/torvalds/linux/commit/1bc63fb1272be0773e925f78c0fbd06...

    Linux changelog wrote:
    mm, memcg: make scan aggression always exclude protection

    This patch is an incremental improvement on the existing memory.{low,min} relative reclaim work to base its scan pressure calculations on how much protection is available compared to the current usage, rather than how much the current usage is over some protection threshold.

    This change doesn’t change the experience for the user in the normal case too much. One benefit is that it replaces the (somewhat arbitrary) 100% cutoff with an indefinite slope, which makes it easier to ballpark a memory.low value.

    As well as this, the old methodology doesn’t quite apply generically to machines with varying amounts of physical memory. Let’s say we have a top level cgroup, workload.slice, and another top level cgroup, system-management.slice. We want to roughly give 12G to system-management.slice, so on a 32GB machine we set memory.low to 20GB in workload.slice, and on a 64GB machine we set memory.low to 52GB. However, because these are relative amounts to the total machine size, while the amount of memory we want to generally be willing to yield to system.slice is absolute (12G), we end up putting more pressure on system.slice just because we have a larger machine and a larger workload to fill it, which seems fairly unintuitive. With this new behaviour, we don’t end up with this unintended side effect.

    Previously the way that memory.low protection works is that if you are 50% over a certain baseline, you get 50% of your normal scan pressure. This is certainly better than the previous cliff-edge behaviour, but it can be improved even further by always considering memory under the currently enforced protection threshold to be out of bounds. This means that we can set relatively low memory.low thresholds for variable or bursty workloads while still getting a reasonable level of protection, whereas with the previous version we may still trivially hit the 100% clamp. The previous 100% clamp is also somewhat arbitrary, whereas this one is more concretely based on the currently enforced protection threshold, which is likely easier to reason about.

    There is also a subtle issue with the way that proportional reclaim worked previously — it promotes having no memory.low, since it makes pressure higher during low reclaim. This happens because we base our scan pressure modulation on how far memory.current is between memory.min and memory.low, but if memory.low is unset, we only use the overage method. In most cromulent configurations, this then means that we end up with more pressure than with no memory.low at all when we’re in low reclaim, which is not really very usable or expected.

    With this patch, memory.low and memory.min affect reclaim pressure in a more understandable and composable way. For example, from a user standpoint, “protected” memory now remains untouchable from a reclaim aggression standpoint, and users can also have more confidence that bursty workloads will still receive some amount of guaranteed protection.

    Link: http://lkml.kernel.org/r/20190322160307.GA3316@chrisdown.name
    Signed-off-by: Chris Down <chris@chrisdown.name>
    Reviewed-by: Roman Gushchin <guro@fb.com>
    Acked-by: Johannes Weiner <hannes@cmpxchg.org>
    Acked-by: Michal Hocko <mhocko@kernel.org>
    Cc: Tejun Heo <tj@kernel.org>
    Cc: Dennis Zhou <dennis@kernel.org>
    Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

    Mocarny
    Mocarny's picture
    Offline
    Last seen: 1 hour 28 min ago
    Joined: 05/10/2019 - 04:03
    Posts: 113
    Location: Poland
    ToyKeeper wrote:
    Mocarny wrote:
    ToyKeeper wrote:
    Remove muggle mode entirely? It’s kind of bad and wastes a lot of space which could be used for other things. Or at least refactor it to make it more robust.

    Maybe making it so there is only smooth ramping and strobes, all config options are locked and max brightness is the last memorized brightness used before entering this mode.

    I don’t really want to add features to muggle mode… if anything, I’d like to reduce it back to its original form — on/off only at ~100 lumens.


    I mean…if people want it, but in my opinion this way it’d be less used – only 100lm is quite low. When I think about use of Muggle mode, it’s like:
    *camping *
    “Hey, could you borrow me your flashlight for a while?” “* set to Muggle mode * Sure, take it”
    With 100lm on off only there’d be not much use of that flashlight. I’m wondering what people think about this “last memorized brightness for max level”, it’s what I found very useful at least, covers “children use” and “friend use”.

    Pages